Skip to content
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

makedocs() broken by incorrect reference #1086

Closed
staticfloat opened this issue Aug 6, 2019 · 3 comments
Closed

makedocs() broken by incorrect reference #1086

staticfloat opened this issue Aug 6, 2019 · 3 comments

Comments

@staticfloat
Copy link
Contributor

I think it's the bullet list that broke Documenter on base, but I'm unsure why. The error is:

ERROR: LoadError: `makedocs` encountered an error. Terminating build
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] runner(::Type{Documenter.Builder.RenderDocument}, ::Documenter.Documents.Document) at /buildworker/worker/doctest_linux64/build/doc/deps/packages/Documenter/cMNJA/src/Builder.jl:242
 [3] dispatch(::Type{Documenter.Builder.DocumentPipeline}, ::Documenter.Documents.Document) at /buildworker/worker/doctest_linux64/build/doc/deps/packages/Documenter/cMNJA/src/Utilities/Selectors.jl:167
 [4] #3 at /buildworker/worker/doctest_linux64/build/doc/deps/packages/Documenter/cMNJA/src/Documenter.jl:319 [inlined]
 [5] cd(::getfield(Documenter, Symbol("##3#8")){Documenter.Documents.Document}, ::String) at ./file.jl:104
 [6] #makedocs#1(::Bool, ::Documenter.Writers.HTMLWriter.HTML, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Base.Iterators.Pairs{Symbol,Any,NTuple{11,Symbol},NamedTuple{(:build, :modules, :clean, :doctest, :linkcheck, :linkcheck_ignore, :strict, :checkdocs, :sitename, :authors, :pages),Tuple{String,Array{Module,1},Bool,Bool,Bool,Array{String,1},Bool,Symbol,String,String,Array{Any,1}}}}, ::typeof(makedocs)) at /buildworker/worker/doctest_linux64/build/doc/deps/packages/Documenter/cMNJA/src/Documenter.jl:318
 [7] (::getfield(Documenter, Symbol("#kw##makedocs")))(::NamedTuple{(:build, :modules, :clean, :doctest, :linkcheck, :linkcheck_ignore, :strict, :checkdocs, :format, :sitename, :authors, :pages),Tuple{String,Array{Module,1},Bool,Bool,Bool,Array{String,1},Bool,Symbol,Documenter.Writers.HTMLWriter.HTML,String,String,Array{Any,1}}}, ::typeof(makedocs)) at ./none:0
 [8] top-level scope at /buildworker/worker/doctest_linux64/build/doc/make.jl:176
 [9] include at ./boot.jl:328 [inlined]
 [10] include_relative(::Module, ::String) at ./loading.jl:1094
 [11] include(::Module, ::String) at ./Base.jl:31
 [12] exec_options(::Base.JLOptions) at ./client.jl:295
 [13] _start() at ./client.jl:468
in expression starting at /buildworker/worker/doctest_linux64/build/doc/make.jl:176

The code causing the issue is here.

@staticfloat
Copy link
Contributor Author

Milan figured it out: JuliaLang/julia#32807

While that fixes it, it might be nice if Documenter could give a more detailed error message in this case.

@staticfloat staticfloat changed the title makedocs() broken by bullet list makedocs() broken by incorrect reference Aug 6, 2019
@mortenpi
Copy link
Member

mortenpi commented Aug 7, 2019

The warning here is actually logging the reason for the error:

[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: skipped.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
┌ Warning: reference for 'cpu_info' could not be found in src/base/base.md.
└ @ Documenter.CrossReferences ~/build/JuliaLang/julia/doc/deps/packages/Documenter/cMNJA/src/CrossReferences.jl:104
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
ERROR: LoadError: `makedocs` encountered an error. Terminating build
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] runner(::Type{Documenter.Builder.RenderDocument}, ::Documenter.Documents.Document) at /home/travis/build/JuliaLang/julia/doc/deps/packages/Documenter/cMNJA/src/Builder.jl:242

As the Base docs are being built with strict = true, everything was actually working as intended.

The only thing I can think of doing here is making sure that the messages telling you about things that trigger a makedocs error would actually be printed with @error instead of an @warn when building with strict = true. Would just have to switch them over to @logmsg I think.

@staticfloat
Copy link
Contributor Author

Ah, yes. I fell into the classic trap; tunnel-visioning into the error and ignoring the warnings DIRECTLY above it. :)

I agree that this is a pretty good state to be in. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants