Skip to content

Fix failing precompilation related to Glossaries.jl#567

Merged
kellertuer merged 7 commits intoJuliaManifolds:masterfrom
JoshuaLampert:fix-precompilation
Jan 15, 2026
Merged

Fix failing precompilation related to Glossaries.jl#567
kellertuer merged 7 commits intoJuliaManifolds:masterfrom
JoshuaLampert:fix-precompilation

Conversation

@JoshuaLampert
Copy link
Copy Markdown
Contributor

@JoshuaLampert JoshuaLampert commented Jan 15, 2026

Currently, Manopt.jl is failing to precompile for me, see https://github.com/JoshuaLampert/SummationByPartsOperatorsExtra.jl/actions/runs/21038116912/job/60491873127?pr=67#step:7:577. I think is is somehow related to v0.1.1 of Glossaries.jl and therefore JuliaManifolds/Glossaries.jl#8 because I verified locally that Manopt.jl precompiles fine with Glossaries.jl v0.1.0 and fails with v0.1.1. However, to me this looks like a bug in Manopt.jl rather than Glossaries.jl because c is indeed undefined and should probably be cases. However, even after this fix I cannot precompile Manopt.jl with the following error:

Info Given Manopt was explicitly requested, output will be shown live 
ERROR: LoadError: MethodError: no method matching (::Manopt.var"#122#123")(::String)
The function `#122` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  (::Manopt.var"#122#123")(; M, p)
   @ Manopt ~/.julia/dev/Manopt/src/documentation_glossary.jl:494

Stacktrace:
  [1] _print(v::Manopt.var"#122#123", args::String; kwargs::@Kwargs{})
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/terms.jl:65
  [2] _print(v::Function, args::String)
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/terms.jl:63
  [3] _print(term::Glossaries.Term{Union{Function, String}}, key::Symbol, args::String; default::String, kwargs::@Kwargs{})
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/terms.jl:59
  [4] _print
    @ ~/.julia/packages/Glossaries/tOo4F/src/terms.jl:57 [inlined]
  [5] (::Glossaries.Field{Main})(term::Glossaries.Term{Union{Function, String}}, args::String; name::String, type::String, add_properties::Vector{Symbol}, kwargs::@Kwargs{})
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/format.jl:195
  [6] (::Glossaries.Field{Main})(term::Glossaries.Term{Union{Function, String}}, args::String)
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/format.jl:187
  [7] (::Glossaries.Field{Main})(glossary::Glossaries.Glossary{Glossaries.GlossarEntry}, key::Symbol, args::String; kwargs::@Kwargs{})
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/format.jl:56
  [8] (::Glossaries.Field{Main})(glossary::Glossaries.Glossary{Glossaries.GlossarEntry}, key::Symbol, args::String)
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/format.jl:53
  [9] _fields(::Symbol, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Manopt ~/.julia/dev/Manopt/src/documentation_glossary.jl:330
 [10] top-level scope
    @ ~/.julia/dev/Manopt/src/plans/stepsize/stepsize.jl:1620
 [11] include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./Base.jl:307
 [12] top-level scope
    @ ~/.julia/dev/Manopt/src/plans/plan.jl:128
 [13] include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./Base.jl:307
 [14] top-level scope
    @ ~/.julia/dev/Manopt/src/Manopt.jl:184
 [15] include(mod::Module, _path::String)
    @ Base ./Base.jl:306
 [16] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:3024
 [17] top-level scope
    @ stdin:5
 [18] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [19] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2870
 [20] include_string
    @ ./loading.jl:2880 [inlined]
 [21] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:315
 [22] _start()
    @ Base ./client.jl:550
in expression starting at /home/lampert/.julia/dev/Manopt/src/plans/stepsize/stepsize.jl:1620
in expression starting at /home/lampert/.julia/dev/Manopt/src/plans/plan.jl:128
in expression starting at /home/lampert/.julia/dev/Manopt/src/Manopt.jl:1
in expression starting at stdin:5
  ✗ Manopt
Precompiling Manopt finished.
  0 dependencies successfully precompiled in 4 seconds. 34 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

Manopt 

Failed to precompile Manopt [0fc0a36d-df90-57f3-8f93-d78a9fc72bb5] to "/home/lampert/.julia/compiled/v1.12/Manopt/jl_sPa4ox".
ERROR: LoadError: MethodError: no method matching (::Manopt.var"#122#123")(::String)
The function `#122` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  (::Manopt.var"#122#123")(; M, p)
   @ Manopt ~/.julia/dev/Manopt/src/documentation_glossary.jl:494

Stacktrace:
  [1] _print(v::Manopt.var"#122#123", args::String; kwargs::@Kwargs{})
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/terms.jl:65
  [2] _print(v::Function, args::String)
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/terms.jl:63
  [3] _print(term::Glossaries.Term{Union{Function, String}}, key::Symbol, args::String; default::String, kwargs::@Kwargs{})
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/terms.jl:59
  [4] _print
    @ ~/.julia/packages/Glossaries/tOo4F/src/terms.jl:57 [inlined]
  [5] (::Glossaries.Field{Main})(term::Glossaries.Term{Union{Function, String}}, args::String; name::String, type::String, add_properties::Vector{Symbol}, kwargs::@Kwargs{})
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/format.jl:195
  [6] (::Glossaries.Field{Main})(term::Glossaries.Term{Union{Function, String}}, args::String)
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/format.jl:187
  [7] (::Glossaries.Field{Main})(glossary::Glossaries.Glossary{Glossaries.GlossarEntry}, key::Symbol, args::String; kwargs::@Kwargs{})
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/format.jl:56
  [8] (::Glossaries.Field{Main})(glossary::Glossaries.Glossary{Glossaries.GlossarEntry}, key::Symbol, args::String)
    @ Glossaries ~/.julia/packages/Glossaries/tOo4F/src/format.jl:53
  [9] _fields(::Symbol, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Manopt ~/.julia/dev/Manopt/src/documentation_glossary.jl:330
 [10] top-level scope
    @ ~/.julia/dev/Manopt/src/plans/stepsize/stepsize.jl:1620
 [11] include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./Base.jl:307
 [12] top-level scope
    @ ~/.julia/dev/Manopt/src/plans/plan.jl:128
 [13] include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./Base.jl:307
 [14] top-level scope
    @ ~/.julia/dev/Manopt/src/Manopt.jl:184
 [15] include(mod::Module, _path::String)
    @ Base ./Base.jl:306
 [16] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:3024
 [17] top-level scope
    @ stdin:5
 [18] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [19] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2870
 [20] include_string
    @ ./loading.jl:2880 [inlined]
 [21] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:315
 [22] _start()
    @ Base ./client.jl:550
in expression starting at /home/lampert/.julia/dev/Manopt/src/plans/stepsize/stepsize.jl:1620
in expression starting at /home/lampert/.julia/dev/Manopt/src/plans/plan.jl:128
in expression starting at /home/lampert/.julia/dev/Manopt/src/Manopt.jl:1
in expression starting at stdin:

This looks very much related to JuliaManifolds/Glossaries.jl#8, but there I do not see a quick fix other than reverting that PR.
Edit: We are also seeing that error in CI.

@JoshuaLampert JoshuaLampert changed the title Fix failing prompilation related to Glossaries.jl Fix failing precompilation related to Glossaries.jl Jan 15, 2026
@JoshuaLampert
Copy link
Copy Markdown
Contributor Author

JoshuaLampert commented Jan 15, 2026

I'm setting this into draft mode until the other issue is also fixed.

@JoshuaLampert JoshuaLampert marked this pull request as draft January 15, 2026 17:00
@kellertuer
Copy link
Copy Markdown
Member

kellertuer commented Jan 15, 2026

Ah, it even happens here, sorry for that.

The short answer is, there are a few _args(:something, "String") (often the string is just "something" as well, which both makes this obsolete and is the reason I missed them), which should be _args(:something; name="String").

For best of cases it is just a cherry pick commit/PR of
0d71e33

will check tomorrow (my work laptop is chilling...at work) and release that as a patch. Thanks for the note and sorry for any inconvenience caused.

edit: Ah yes and the c is cases; not sure why that never errored before.

@JoshuaLampert
Copy link
Copy Markdown
Contributor Author

Yes, that sounds reasonable. I figured there is something wrong with calling _args and _kwargs, but then I needed to leave. I'll probably try to fix that tonight (because I took my work laptop with me home 😉)

@kellertuer
Copy link
Copy Markdown
Member

I checked the one commit above and that should actually fix it. For those errors I am not sure why they did not appear before, they are nearly unrelated to the Glossaries patch; but well ;)

Sure feel free to cherry pick that commit here, it also fixes a few more typos I had in code/docs (so they were not seen by typos)

@JoshuaLampert
Copy link
Copy Markdown
Contributor Author

Ok, I git cherry-picked the commit and locally it precompiled again. I hope I resolved the merge conflict in documentation_glossary.jl correctly.

Comment thread src/solvers/proximal_gradient_method.jl Outdated
@JoshuaLampert JoshuaLampert marked this pull request as ready for review January 15, 2026 20:12
Comment thread src/documentation_glossary.jl Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (82fe6c2) to head (6c49b2b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #567   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           91        91           
  Lines         9975      9975           
=========================================
  Hits          9975      9975           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/documentation_glossary.jl Outdated
@kellertuer kellertuer merged commit 9670dd6 into JuliaManifolds:master Jan 15, 2026
15 checks passed
@JoshuaLampert JoshuaLampert deleted the fix-precompilation branch January 15, 2026 21:20
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

Successfully merging this pull request may close these issues.

2 participants