Warnings when installing MTK on Julia-1.12.0-beta4
When installing MTK in a clean project, I get the following warnings:
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
Precompiling packages finished.
268 dependencies successfully precompiled in 118 seconds. 37 already precompiled.
3 dependencies had output during precompilation:
┌ NonlinearSolveFirstOrder
│ WARNING: Detected access to binding `NonlinearSolveFirstOrder.GeneralizedFirstOrderAlgorithm` in a world prior to its definition world.
│ Julia 1.12 has introduced more strict world age semantics for global bindings.
│ !!! This code may malfunction under Revise.
│ !!! This code will error in future versions of Julia.
│ Hint: Add an appropriate `invokelatest` around the access to this binding.
│ To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
└
┌ ModelingToolkit
│ WARNING: Detected access to binding `ModelingToolkit.System` in a world prior to its definition world.
│ Julia 1.12 has introduced more strict world age semantics for global bindings.
│ !!! This code may malfunction under Revise.
│ !!! This code will error in future versions of Julia.
│ Hint: Add an appropriate `invokelatest` around the access to this binding.
│ To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
│ WARNING: Detected access to binding `ModelingToolkit.SystemStructure` in a world prior to its definition world.
│ Julia 1.12 has introduced more strict world age semantics for global bindings.
│ !!! This code may malfunction under Revise.
│ !!! This code will error in future versions of Julia.
│ Hint: Add an appropriate `invokelatest` around the access to this binding.
│ To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
│ WARNING: Detected access to binding `ModelingToolkit.SparseMatrixCLIL` in a world prior to its definition world.
│ Julia 1.12 has introduced more strict world age semantics for global bindings.
│ !!! This code may malfunction under Revise.
│ !!! This code will error in future versions of Julia.
│ Hint: Add an appropriate `invokelatest` around the access to this binding.
│ To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
│ WARNING: Detected access to binding `ModelingToolkit.TearingState` in a world prior to its definition world.
│ Julia 1.12 has introduced more strict world age semantics for global bindings.
│ !!! This code may malfunction under Revise.
│ !!! This code will error in future versions of Julia.
│ Hint: Add an appropriate `invokelatest` around the access to this binding.
│ To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
│ WARNING: Detected access to binding `ModelingToolkit.ClockInference` in a world prior to its definition world.
│ Julia 1.12 has introduced more strict world age semantics for global bindings.
│ !!! This code may malfunction under Revise.
│ !!! This code will error in future versions of Julia.
│ Hint: Add an appropriate `invokelatest` around the access to this binding.
│ To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
│ WARNING: Detected access to binding `BipartiteGraphs.BipartiteGraph` in a world prior to its definition world.
│ Julia 1.12 has introduced more strict world age semantics for global bindings.
│ !!! This code may malfunction under Revise.
│ !!! This code will error in future versions of Julia.
│ Hint: Add an appropriate `invokelatest` around the access to this binding.
│ To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
│ WARNING: Detected access to binding `ModelingToolkit.MTKParameters` in a world prior to its definition world.
│ Julia 1.12 has introduced more strict world age semantics for global bindings.
│ !!! This code may malfunction under Revise.
│ !!! This code will error in future versions of Julia.
│ Hint: Add an appropriate `invokelatest` around the access to this binding.
│ To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
└
┌ SimpleNonlinearSolve
│ WARNING: Detected access to binding `SimpleNonlinearSolve.SimpleNewtonRaphson` in a world prior to its definition world.
│ Julia 1.12 has introduced more strict world age semantics for global bindings.
│ !!! This code may malfunction under Revise.
│ !!! This code will error in future versions of Julia.
│ Hint: Add an appropriate `invokelatest` around the access to this binding.
│ To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
└
Output of versioninfo():
(@v1.12) pkg> st
Status `~/.julia/environments/v1.12/Project.toml`
[961ee093] ModelingToolkit v10.1.0
julia> versioninfo()
Julia Version 1.12.0-beta4
Commit 600ac61d3d2 (2025-06-05 07:03 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 32 × AMD Ryzen 9 7950X 16-Core Processor
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, znver4)
GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 32 virtual cores)
Environment:
LD_LIBRARY_PATH = /lib:/usr/lib:/usr/local/lib
Dup?
No, the warnings are different when comparing with #3701 Also, this is more urgent to fix than the warnings for Julia 1.13.
But it's also a Julia-level bug. After https://github.com/SciML/NonlinearSolve.jl/commit/22901216f0a3c1dc96afa35c2040b1a8812e908b I know for the last 2 months that the definition of GeneralizedFirstOrderAlgorithm is before the first usage. So I assume this is still just a bug in the beta, otherwise this warning needs line numbers.
@gbaraldi @topolarity
@ChrisRackauckas You say that there is a bug in Julia 1.12 beta. Do you know which one? If yes, can you link it? If not, can you create an issue for this bug? Without issue it will not get fixed.
Exact same as https://github.com/SciML/ModelingToolkit.jl/issues/3701, either it was https://github.com/JuliaObjects/ConstructionBase.jl/pull/102 or it's a bug in Julia, since it's very easy to prove that the first usage of the type is before the call.