-
Notifications
You must be signed in to change notification settings - Fork 15
Docile gives me the weirdest bugs #145
Comments
Thanks for reporting this @zenna. Which version of Docile are you using, also what's the extact commit from Julia 0.3 you're on? |
BTW, have you tried using the new bare docstrings that were recently added to |
Got it working, well breaking with the following backtrace rather:
|
@MichaelHatherly I"m working on getting Sigma easier to load. I've been using julia version 0.3.10. And Docile 0.5.12. I just read about the bare strings earlier today, I'm going to change to that, see if it helps. |
With this diff (edit: apologies for the whitespace mangling my editor has done to the diff) I've managed to get
You'll see I've removed the |
Since you don't need to actually do |
Ok, awesome, thanks. |
Another issue: can't write docs with Lexicon julia> using Lexicon
julia> save("docs/funcs.md", Sigma)
Docile: updating package list...
Docile: caching 1 module from 'Sigma'.
INFO: writing documentation to docs/funcs.md
ERROR: type cannot be constructed
in generate_html_id at /home/zenna/.julia/v0.3/Lexicon/src/render.jl:217
in prepare_entries at /home/zenna/.julia/v0.3/Lexicon/src/render.jl:153
in mainsetup at /home/zenna/.julia/v0.3/Lexicon/src/render.jl:125
in anonymous at /home/zenna/.julia/v0.3/Lexicon/src/render/md.jl:20
in open at iostream.jl:137
in save at /home/zenna/.julia/v0.3/Lexicon/src/render/md.jl:17
in save at /home/zenna/.julia/v0.3/Lexicon/src/render.jl:165
in save at /home/zenna/.julia/v0.3/Lexicon/src/render.jl:168 |
Looks like a 0.4 |
Could you apply this diff and see if it works then? diff --git a/src/render.jl b/src/render.jl
index d6ca1a5..2913b77 100644
--- a/src/render.jl
+++ b/src/render.jl
@@ -214,7 +214,7 @@ function generate_html_id(s::AbstractString)
elseif c in replace_chars
write(io, "_")
else
- write(io, string(Int(c)))
+ write(io, string(@compat(Int(c))))
end
end
# Note: In our case no need to check for begins with letter or is empty |
That seems to work! |
Cool, I'll tag a new release of Lexicon with that compat fix tomorrow morning then, thanks for testing that. Re: the module Sandbox
using Docile
for f in ["a.jl",
"b.jl",
"c.jl"]
include(joinpath("files", f))
end
end is loading fine and the contents of the subfiles are available. So no luck so far... perhaps it depends on the size of the package. Have you overridden any methods from |
The Lexicon fix is now in this tagged version. |
I have been trying to use Docile, but it gives me the weirdest bugs.
Sometimes when a
@doc
is included in a certain place my module won't load. It get's caught in some infinite loop.In other places, for example the following snippet taken from here
Docile causes Julia to just skip over including executable.jl or randarray.jl.
Unfortunately, I haven't been able to reproduce these thigns in a simple example, but the problems go away when I remove all
@doc
or use Julia0.4 with its own support for@doc
The text was updated successfully, but these errors were encountered: