AlgebraicJulia / AlgebraicPetri.jl

Build Petri net models compositionally
https://algebraicjulia.github.io/AlgebraicPetri.jl/
MIT License
76 stars 21 forks source link

Precompilation warnings in package extensions #162

Open epatters opened 1 year ago

epatters commented 1 year ago

When precompiling the OrdinaryDiffEq and ModelingToolkit extensions, I get the following warnings:

  2 dependencies had warnings during precompilation:
┌ AlgebraicPetriModelingToolkitExt [64666759-9bd1-54ef-b315-8c08f09f6f3d]
│  WARNING: Method definition (::Type{SciMLBase.ODEProblem{uType, tType, isinplace, P, F, K, PT} where PT where K where F where P where isinplace where tType where uType})(AlgebraicPetri.AbstractPetriNet{S, Ts, P} where P where Ts where S, Any) in module AlgebraicPetriOrdinaryDiffEqExt at /home/epatters/Local/algjulia/algpetri/ext/AlgebraicPetriOrdinaryDiffEqExt.jl:7 overwritten in module AlgebraicPetriModelingToolkitExt at /home/epatters/Local/algjulia/algpetri/ext/AlgebraicPetriModelingToolkitExt.jl:47.
│    ** incremental compilation may be fatally broken for this module **
└  
┌ AlgebraicPetriCatalystExt [77e4b18c-d989-5097-a0f2-659ba3bbce58]
│  WARNING: Method definition (::Type{SciMLBase.ODEProblem{uType, tType, isinplace, P, F, K, PT} where PT where K where F where P where isinplace where tType where uType})(AlgebraicPetri.AbstractPetriNet{S, Ts, P} where P where Ts where S, Any) in module AlgebraicPetriOrdinaryDiffEqExt at /home/epatters/Local/algjulia/algpetri/ext/AlgebraicPetriOrdinaryDiffEqExt.jl:7 overwritten in module AlgebraicPetriModelingToolkitExt at /home/epatters/Local/algjulia/algpetri/ext/AlgebraicPetriModelingToolkitExt.jl:47.
│    ** incremental compilation may be fatally broken for this module **
│  
│  WARNING: Method definition (::Type{SciMLBase.ODEProblem{uType, tType, isinplace, P, F, K, PT} where PT where K where F where P where isinplace where tType where uType})(AlgebraicPetri.AbstractPetriNet{S, Ts, P} where P where Ts where S, Any) in module AlgebraicPetriOrdinaryDiffEqExt at /home/epatters/Local/algjulia/algpetri/ext/AlgebraicPetriOrdinaryDiffEqExt.jl:7 overwritten in module AlgebraicPetriModelingToolkitExt at /home/epatters/Local/algjulia/algpetri/ext/AlgebraicPetriModelingToolkitExt.jl:47.
│    ** incremental compilation may be fatally broken for this module **

This is on Catlab v0.15.5.

mehalter commented 1 year ago

Yeah it looks like there was a breaking change in a dependency. I was looking into this earlier today actually. Looks like the error is coming from Symbolics.jl which is an indirect dependency

mehalter commented 1 year ago

Thank god for "semantic versioning" allowing us to update freely without hitting breaking changes...

mehalter commented 1 year ago

Also for reference, here is a force re-run of the tests a few hours ago if anyone wants to look at the logs:

https://github.com/AlgebraicJulia/AlgebraicPetri.jl/actions/runs/6656621641

epatters commented 1 year ago
julia> import OrdinaryDiffEq, ModelingToolkit

julia> OrdinaryDiffEq.ODEProblem === ModelingToolkit.ODEProblem
true

Is this equality a recent change? It would explain why the extensions are stomping on each other.

mehalter commented 1 year ago

I actually pulled out an old laptop and can run the current main branch successfully :joy: thank god for not updating old laptops LOL

I am going to investigate the current versions and see if I can identify which version of something caused the break

mehalter commented 1 year ago

Also just tested in this setup and that equality is holding true even in the environment I have where it works. I will try to identify what version of Symbolics/Catalyst/Julia breaks this

mehalter commented 1 year ago

Looks like updating all dependencies except pinning Symbolics to 5.5.0 it works. Updating just Symbolics to 5.10.0 introduces the issue. Currently bisecting the problematic version, but it's taking some time... dang precompilation

mehalter commented 1 year ago

Oh man, I just realized I misread the original issue here and am talking about a different issue...

mehalter commented 1 year ago

Sorry for the noise here! I marked my previous comments all off topic

joshday commented 8 months ago

It looks like this severely stalls the precompilation of SimulationService.jl. I get a fun mix of warnings and errors. Happy to share the terminal output if it will help.

jpfairbanks commented 8 months ago

Closed by #167 as soon as tests pass!