Hello,
I’m trying to use the AutomaticDocstring package, but I cannot make it work.
When I evaluate to following the example from the docs in Juno:
using AutomaticDocstrings
@autodoc
function f(x::A, b=5; c=LinRange(1,2,10)) where A
5
end
Instead of getting the docstring, I get this error message next to the @autodoc macro:
I did not find a function or struct definition. Place `@autodoc` right above a function or struct definition. Line number: 3
error(::String) at error.jl:33
get_function_definition(::String, ::Int64) at AutomaticDocstrings.jl:60
generate_docstring(::String, ::Int64) at AutomaticDocstrings.jl:50
autodoc(::String, ::Int64) at AutomaticDocstrings.jl:26
top-level scope at AutomaticDocstrings.jl:20
I’m using Juno 0.7.0
Here is the output of versioninfo()
julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, haswell)
Environment:
JULIA_EDITOR = atom -a
JULIA_NUM_THREADS = 4
I’m on ubuntu 18
Any help would be welcome.
Best,
Olivier