Precompilation error with Catalyst (Circular dependency)

Hello everyone,

I am currently working on a biology modeling project for my Master’s internship, using an environment provided by my lab.
When trying to load our local package (which depends heavily on the SciML ecosystem, specifically ModelingToolkit), the precompilation completely fails due to a circular dependency warning followed by a __precompile__(false) error.

For reference, the source code of our local package can be found here: SynapseElife GitHub repository.

Here is the minimal working example I run:

cd(@__DIR__)
using Pkg
pkg"activate ."

using SynapseElife

And here is the error log I get :

┌ Warning: Circular dependency detected.
│ Precompilation will be skipped for dependencies in this cycle:
│  ┌ Symbolics → SymbolicsPreallocationToolsExt
│  └─ Symbolics → SymbolicsForwardDiffExt
│ Precompilation will also be skipped for the following, which depend on the above cycle:
│   ModelingToolkit
│   SynapseElife
│   ModelingToolkit → MTKLabelledArraysExt
│   Catalyst
└ @ Pkg.API.Precompilation ~/.julia/juliaup/julia-1.10.10+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/precompilation.jl:583
[ Info: Precompiling SynapseElife [7cc9ea39-daa9-4846-be95-d8a08c9e3c85]
┌ Warning: Module SymbolicsPreallocationToolsExt with build ID ffffffff-ffff-ffff-51ce-44c5a6a88d92 is missing from the cache.
│ This may mean SymbolicsPreallocationToolsExt [d479e226-fb54-5ebe-a75e-a7af7f39127f] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2018
┌ Error: Error during loading of extension SymbolicsPreallocationToolsExt of Symbolics, use `Base.retry_load_extensions()` to retry.
│   exception =
│    1-element ExceptionStack:
│    Declaring __precompile__(false) is not allowed in files that are being precompiled.
│    Stacktrace:
│      [1] _require(pkg::Base.PkgId, env::Nothing)
│        @ Base ./loading.jl:2022
# ... (Truncated stacktrace for readability, pointing to loading.jl)

Environment details:
OS: macOS (Apple Silicon / aarch64)
Julia version: 1.10.10

Relevant package versions:
Symbolics.jl: v6.58.0
ModelingToolkit.jl: v9.84.0
PreallocationTools.jl: v0.4.34

We are trying to avoid a blind ] update because the biological model was validated on these specific versions.
Is there a known workaround to fix this cache/precompilation issue without breaking the environment?

Thanks in advance for your help !

This doesn’t really look like a Catalyst issue, but something at the level of Symbolics.jl. If you want to use the exact versions you had previously you also need the Manifest.toml file from when you last ran the code. Otherwise you aren’t guaranteed to reproduce the exact environment.

You might look at this issue:

Seems like this is a Julia 1.10 bug.

And I think this should be fixed in the next 1.10 release, so you could try running with the release branch: