JuliaDocs / Documenter.jl

A documentation generator for Julia.
https://documenter.juliadocs.org
MIT License
812 stars 479 forks source link

"terminating build" messages should be clearer #1671

Open ExpandingMan opened 3 years ago

ExpandingMan commented 3 years ago

I encountered the following when trying to build some docs

[ Info: Precompiling AWSBatch [dcae83d4-2881-5875-9d49-e5534165e9c0]
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
┌ Warning: no docs found for 'AWSBatch.ComputeEnvironment' in `@docs` block in src/index.md:68-78
│ ```@docs
│ AWSBatch.JobDefinition
│ AWSBatch.ComputeEnvironment
│ AWSBatch.create_compute_environment
│ AWSBatch.list_job_definitions
│ AWSBatch.job_definition_arn(::AbstractString)
│ AWSBatch.register(::AbstractString)
│ AWSBatch.deregister(::JobDefinition)
│ AWSBatch.isregistered(::JobDefinition)
│ AWSBatch.describe(::JobDefinition)
│ ```
└ @ Documenter.Expanders ~/.julia/packages/Documenter/R2HVS/src/Expanders.jl:336
┌ Warning: no docs found for 'AWSBatch.JobQueue' in `@docs` block in src/index.md:82-86
│ ```@docs
│ AWSBatch.JobQueue
│ AWSBatch.create_job_queue
│ AWSBatch.list_job_queues
│ ```
└ @ Documenter.Expanders ~/.julia/packages/Documenter/R2HVS/src/Expanders.jl:336
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
ERROR: LoadError: `makedocs` encountered an error. Terminating build
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] runner(#unused#::Type{Documenter.Builder.RenderDocument}, doc::Documenter.Documents.Document)
   @ Documenter.Builder ~/.julia/packages/Documenter/R2HVS/src/Builder.jl:255
 [3] dispatch(#unused#::Type{Documenter.Builder.DocumentPipeline}, x::Documenter.Documents.Document)
   @ Documenter.Utilities.Selectors ~/.julia/packages/Documenter/R2HVS/src/Utilities/Selectors.jl:170
 [4] #2
   @ ~/.julia/packages/Documenter/R2HVS/src/Documenter.jl:257 [inlined]
 [5] cd(f::Documenter.var"#2#3"{Documenter.Documents.Document}, dir::String)
   @ Base.Filesystem ./file.jl:106
 [6] #makedocs#1
   @ ~/.julia/packages/Documenter/R2HVS/src/Documenter.jl:256 [inlined]
 [7] top-level scope
   @ ~/.julia/dev/AWSBatch/docs/make.jl:3
 [8] include(fname::String)
   @ Base.MainInclude ./client.jl:444
 [9] top-level scope
   @ REPL[3]:1
in expression starting at /home/expandingman/.julia/dev/AWSBatch/docs/make.jl:3

At first I thought this was a bug: I saw that doc.internal.errors must have gotten populated with an error but I figured that whatever caused this was silent when it was supposed to have given a message. I now suspect that actually, whatever populated doc.internal.errors was in one of the warning messages.

This is pretty confusing, it conflates the meaning of WARN and ERROR. The log up until it terminates would seem to indicate that nothing irreparable is occurring, and I should expect the process to complete. The "terminating build" error then leaves me wondering what actually happened. In my case, build was created and seems correct, but I don't know what the behavior of this is supposed to be in general.

I suggest one of the following alternatives:

mortenpi commented 3 years ago

What version of Documenter is this? I thought we made them consistent in #1349.

ExpandingMan commented 3 years ago

Uh... should have been latest tag, but I'm not 100% confident in that. Will have to check again...