ModelingToolkit.jl icon indicating copy to clipboard operation
ModelingToolkit.jl copied to clipboard

Warnings when installing on Julia 1.13.0-DEV.709

Open ufechner7 opened this issue 7 months ago • 4 comments

juliaup add nightly
julia +nightly

and then

using ModelingToolkit

results in

mpiling packages finished.
  268 dependencies successfully precompiled in 201 seconds. 36 already precompiled.
  3 dependencies had output during precompilation:
┌ 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`.
└  
┌ 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`.
julia> versioninfo()
Julia Version 1.13.0-DEV.709
Commit 995ea2c8845 (2025-06-06 01:19 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 7840U w/ Radeon  780M Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-20.1.2 (ORCJIT, znver4)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 16 virtual cores)

ufechner7 avatar Jun 06 '25 04:06 ufechner7

 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`.
└  
┌ 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`.
└  

I think those are bugs in Julia. @gbaraldi @topolarity

ChrisRackauckas avatar Jun 06 '25 13:06 ChrisRackauckas

This is coming from a generated function in ConstructionBase

gbaraldi avatar Jun 06 '25 15:06 gbaraldi

Which line of code in SimpleNonlinearSolve.jl is supposedly the issue here? It would be good if it gave what line exactly is the one it's saying is before the definition. It sounds though like it's some odd effect of generated functions.

ChrisRackauckas avatar Jun 06 '25 15:06 ChrisRackauckas

This is https://github.com/JuliaObjects/ConstructionBase.jl/pull/102

gbaraldi avatar Jun 06 '25 16:06 gbaraldi