You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Types with with a documented call method (e.g. (x::DataType)) are giving an error when building docs in Julia 0.5 using the current version of Documenter.jl.
For example, the simple type Wrapper:
""" Wrapper(f)Wrap a function."""
type Wrapper
f::Functionend""" (wrapper::Wrapper)(args...; kwargs...)Call wrapped function."""
(w::Wrapper)(args...; kwargs...) = w.f(args...; kwargs...)
gives the following error when documentation is built:
$ julia make.jl
Documenter: setting up build directory.
Documenter: expanding markdown templates.
ERROR: LoadError: UndefVarError: w not defined
in category(::Base.Docs.Binding) at /Users/josh/.julia/v0.5/Documenter/src/DocSystem.jl:380
in runner(::Type{Documenter.Expanders.AutoDocsBlocks}, ::Base.Markdown.Code, ::Documenter.Documents.Page, ::Documenter.Documents.Document) at /Users/josh/.julia/v0.5/Documenter/src/Expanders.jl:335
in dispatch(::Type{Documenter.Expanders.ExpanderPipeline}, ::Base.Markdown.Code, ::Documenter.Documents.Page, ::Documenter.Documents.Document) at /Users/josh/.julia/v0.5/Documenter/src/Selectors.jl:164
in expand(::Documenter.Documents.Document) at /Users/josh/.julia/v0.5/Documenter/src/Expanders.jl:29
in dispatch(::Type{Documenter.Builder.DocumentPipeline}, ::Documenter.Documents.Document) at /Users/josh/.julia/v0.5/Documenter/src/Selectors.jl:164
in cd(::Documenter.##2#3{Documenter.Documents.Document}, ::String) at ./file.jl:59
in #makedocs#1(::Bool, ::Array{Any,1}, ::Function) at /Users/josh/.julia/v0.5/Documenter/src/Documenter.jl:159
in (::Documenter.#kw##makedocs)(::Array{Any,1}, ::Documenter.#makedocs) at ./<missing>:0
in include_from_node1(::String) at ./loading.jl:488
in include_from_node1(::String) at /usr/local/Cellar/julia/0.5.0/lib/julia/sys.dylib:?
in process_options(::Base.JLOptions) at ./client.jl:262
in _start() at ./client.jl:318
in _start() at /usr/local/Cellar/julia/0.5.0/lib/julia/sys.dylib:?
while loading /Users/josh/doctest/make.jl, in expression starting on line 29
Documenting call overloads is not supported by Julia's docsystem, since there isn't a named object that the docstring can actually be bound to (you'd want to bind the doc to an instance of Wrapper). The recommended approach is to document within the type's docstring that objects of type Wrapper are callable and provide a usage example there.
Types with with a documented call method (e.g.
(x::DataType)
) are giving an error when building docs in Julia 0.5 using the current version of Documenter.jl.For example, the simple type
Wrapper
:gives the following error when documentation is built:
See this gist for a complete example.
The text was updated successfully, but these errors were encountered: