-
Notifications
You must be signed in to change notification settings - Fork 516
Error on duplicate ref a bit too eager and too uninformative? #2843
Description
A few days ago my CI suddenly started to fail, see e.g. the 66(!) errors at
https://github.com/JuliaManifolds/Manopt.jl/actions/runs/19391210207/job/55484919743#step:8:1970
For me an error message like
┌ Error: Cannot resolve @ref for md"[`Stepsize`](@ref)" in docs/src/solvers/NelderMead.md.
│ - Header with slug 'Stepsize' is not unique in docs/src/solvers/NelderMead.md.
└ @ Documenter ~/.julia/packages/Documenter/yVko2/src/utilities/utilities.jl:47
when the corresponding Markdown file
https://github.com/JuliaManifolds/Manopt.jl/blob/master/docs/src/solvers/NelderMead.md
does not even contain that. Sure the rendered page
https://manoptjl.org/stable/solvers/NelderMead/#Manopt.NelderMeadState
refers to the type, but also has only one such reference and that works correctly.
Sure in strict mode, errors is what one usually asks for, but why does this error? It is unique!
I lost quite some time until on Slack I was hinted to #2787. While that is a bug fix maybe
a) a more informative message (maybe mention the alternatives is could not distinguish?)
b) at least for a version a warning and only starting in 1.17 an error would have been nice? Cf #2751 where even a thrown warning being turned into an error is discussed as breaking. Here a not-even-warning was directly turned into erroring (tremendously).
Turns out, the fix is just this commit JuliaManifolds/Manopt.jl@105de42
one page had a header which I gave the id stepsize (accidentally probably) and I had two headers of subsections with that title. So 3 errors (that I wished would be warnings first) would be ok.
Maybe this is a bit over reporting now?
That the two pages with stepsize headers should error if one refers to Stepsize and it is unclear whether it should be the type or the section. But outside of that page - and for all 66 occurrences of the (in all places) correctly resolved link to the type?