-
-
Notifications
You must be signed in to change notification settings - Fork 116
Add doc_str and doc macros, to support Base.Docs/Docile syntax. #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -38,6 +38,16 @@ if VERSION < v"0.4.0-dev+412" | |||
eval(Base, :(const IPAddr = IpAddr)) | |||
end | |||
|
|||
if VERSION < v"0.4.0-dev" | |||
try | |||
import Docile: @doc_str, @docmstr, @doc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@docmstr
-> @doc_mstr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, thanks!
The version condition should probably be a bit more specific since |
Hmmm, it's been a long time > 6 months I think? Happy to tweak this if it's easy to work out. Edit: JuliaLang/julia#8791 (November) |
|
okey dokey, let's go with that. :) |
Needs a test. |
Add tests for doc-syntax.
Added test. locally this works on 0.3 both with and without Docile. |
@MichaelHatherly actually when I look at this, help doesn't seem to work for me on 0.3 (before this PR). I was under the impression that
Maybe there is something funky about my 0.3 install. Should this work? |
To get help in 0.3 for packages you need to import Lexicon first. Docile only provides the docstrings while Lexicon hooks into the base help system. |
I think it would be nice to merge this soon... One potential issue is this may cause some warnings where libraries have already tried to import Docile ? The trick being, remove the using/import of Docile and let Compat do the work. ? |
I'm going to pull the trigger on this in the next few days unless there's any more comments. |
Add doc_str and doc macros, to support Base.Docs/Docile syntax.
@hayd, this is causing failures for packages on 0.3 that import Docile after Compat, https://github.com/JuliaGraphics/ColorTypes.jl/blob/a8dd9a3834b76e48db138141ab586325cd4efaa6/src/ColorTypes.jl#L5-L8. This probably needs to be reverted unless there's a way to avoid the imports clashing. First see here https://groups.google.com/forum/#!topic/julia-users/rsM4hxdkAxg. |
Re-write {} as Any[] because {} is deprecated in 0.4
fix #56.