JuliaLogging / LoggingExtras.jl

Composable Loggers for the Julia Logging StdLib
Other
142 stars 21 forks source link

how to build the documentation ? #89

Open reumle opened 5 months ago

reumle commented 5 months ago

Hello thank you for the package!

I dowloaded the repo and tried to build the doc locally. This fails with the following message:

C:\proj\PS1908\julia\LoggingExtras_24T2\LoggingExtras.jl\docs>julia --color=yes --project make.jl
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
[ Info: CrossReferences: building cross-references.
┌ Error: Cannot resolve @ref for md"[`@debugv`](@ref)" in src\index.md.
│ - No docstring found in doc for binding `LoggingExtras.@debugv`.
│ - No docstring found in doc for binding `LoggingExtras.@debugv`.
└ @ Documenter C:\Users\elm\.julia\packages\Documenter\CJeWX\src\utilities\utilities.jl:44
┌ Error: Cannot resolve @ref for md"[`@infov`](@ref)" in src\index.md.
│ - No docstring found in doc for binding `LoggingExtras.@infov`.
│ - No docstring found in doc for binding `LoggingExtras.@infov`.
└ @ Documenter C:\Users\elm\.julia\packages\Documenter\CJeWX\src\utilities\utilities.jl:44
┌ Error: Cannot resolve @ref for md"[`@warnv`](@ref)" in src\index.md.
│ - No docstring found in doc for binding `LoggingExtras.@warnv`.
│ - No docstring found in doc for binding `LoggingExtras.@warnv`.
└ @ Documenter C:\Users\elm\.julia\packages\Documenter\CJeWX\src\utilities\utilities.jl:44
┌ Error: Cannot resolve @ref for md"[`@errorv`](@ref)" in src\index.md.
│ - No docstring found in doc for binding `LoggingExtras.@errorv`.
│ - No docstring found in doc for binding `LoggingExtras.@errorv`.
└ @ Documenter C:\Users\elm\.julia\packages\Documenter\CJeWX\src\utilities\utilities.jl:44
┌ Error: Cannot resolve @ref for md"[`@logmsgv`](@ref)" in src\index.md.
│ - No docstring found in doc for binding `LoggingExtras.@logmsgv`.
│ - No docstring found in doc for binding `LoggingExtras.@logmsgv`.
└ @ Documenter C:\Users\elm\.julia\packages\Documenter\CJeWX\src\utilities\utilities.jl:44
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
ERROR: LoadError: `makedocs` encountered an error [:cross_references] -- terminating build before rendering.
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:35
 [2] runner(::Type{Documenter.Builder.RenderDocument}, doc::Documenter.Document)
   @ Documenter C:\Users\elm\.julia\packages\Documenter\CJeWX\src\builder_pipeline.jl:253
 [3] dispatch(::Type{Documenter.Builder.DocumentPipeline}, x::Documenter.Document)
   @ Documenter.Selectors C:\Users\elm\.julia\packages\Documenter\CJeWX\src\utilities\Selectors.jl:170
 [4] #86
   @ C:\Users\elm\.julia\packages\Documenter\CJeWX\src\makedocs.jl:248 [inlined]
 [5] withenv(::Documenter.var"#86#88"{Documenter.Document}, ::Pair{String, Nothing}, ::Vararg{Pair{String, Nothing}})
   @ Base .\env.jl:257
 [6] #85
   @ C:\Users\elm\.julia\packages\Documenter\CJeWX\src\makedocs.jl:247 [inlined]
 [7] cd(f::Documenter.var"#85#87"{Documenter.Document}, dir::String)
   @ Base.Filesystem .\file.jl:101
 [8] #makedocs#84
   @ C:\Users\elm\.julia\packages\Documenter\CJeWX\src\makedocs.jl:247 [inlined]
 [9] top-level scope
   @ C:\proj\PS1908\julia\LoggingExtras_24T2\LoggingExtras.jl\docs\make.jl:4
in expression starting at C:\proj\PS1908\julia\LoggingExtras_24T2\LoggingExtras.jl\docs\make.jl:4

Is there a known way to build the docs? The error seems related to some macros within the verbosity.jl file but this is above my expertise....

I am on julia 1.10.2. with a fresh documenter etc.

PS i want to build the doc because I need to understand the package better, I am not able to use it very productively... 😒

oxinabox commented 5 months ago

I don't know where you got a docs/make.jl but I am pretty sure you need to add a strict=false so that it doesn't error on missing docstrings, and missing cross-references. And probably we need to fix those.

This package, kinda intentionallys (as an experiment) doesn't use Documentor.jl

Edit (Fredrik): Updated the Youtube link