BoundaryValueDiffEq fails to compile when DataStructures held back <0.19 by other package in Project
bug
If `DataStructures` is held to v0.18 (say, by `Dash`), adding `DifferentialEquations` fails to compile its dependency `BoundaryValueDiffEq`.
Simplest steps to reproduce:
```
julia> versioninfo()
Julia Version 1.12.6
Commit 15346901f00 (2026-04-09 19:20 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 128 × AMD Ryzen Threadripper PRO 9985WX 64-Cores
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, znver5)
GC: Built with stock GC
Threads: 128 default, 1 interactive, 128 GC (on 128 virtual cores)
julia> cd("workspace/")
(@v1.12) pkg> activate Test
Activating new project at `~/workspace/Test`
(Test) pkg> add Dash
(Test) pkg> add DifferentialEquations
✗ BoundaryValueDiffEqFIRK
✗ BoundaryValueDiffEqMIRK
✗ BoundaryValueDiffEq
✗ DifferentialEquations
Precompiling packages finished.
101 dependencies successfully precompiled in 95 seconds. 232 already precompiled.
4 dependencies errored.
For a report of the errors see `julia> err`. To retry use `pkg> precompile`
julia> show(err)
PkgPrecompileError: The following 1 direct dependency failed to precompile:
DifferentialEquations
Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to "/home/sob/.julia/compiled/v1.12/DifferentialEquations/jl_Yq21uP".
ERROR: LoadError: TaskFailedException
nested task error: MethodError: no method matching __initial_guess_on_mesh(::Vector{Float64}, ::Vector{Float64}, ::SciMLBase.NullParameters; tune_parameters::Bool)
This method does not support all of the given keyword arguments (and may not support any).
An arithmetic operation was performed on a NullParameters object. This means no parameters were passed
into the AbstractSciMLProblem (e.x.: ODEProblem) but the parameters object `p` was used in an arithmetic
expression. Two common reasons for this issue are:
1. Forgetting to pass parameters into the problem constructor. For example, `ODEProblem(f,u0,tspan)` should
be `ODEProblem(f,u0,tspan,p)` in order to use parameters.
2. Using the wrong function signature. For example, with `ODEProblem`s the function signature is always
`f(du,u,p,t)` for the in-place form or `f(u,p,t)` for the out-of-place form. Note that the `p` argument
will always be in the function signature regardless of if the problem is defined with parameters!
Closest candidates are:
__initial_guess_on_mesh(::AbstractArray, ::Any, ::Any) got unsupported keyword argument "tune_parameters"
@ BoundaryValueDiffEqCore ~/.julia/packages/BoundaryValueDiffEqCore/002A7/src/utils.jl:636
__initial_guess_on_mesh(::F, ::Any, ::Any) where F got unsupported keyword argument "tune_parameters"
@ BoundaryValueDiffEqCore ~/.julia/packages/BoundaryValueDiffEqCore/002A7/src/utils.jl:639
__initial_guess_on_mesh(::AbstractVector{<:AbstractArray}, ::Any, ::Any) got unsupported keyword argument "tune_parameters"
@ BoundaryValueDiffEqCore ~/.julia/packages/BoundaryValueDiffEqCore/002A7/src/utils.jl:624
...
```
Doing the steps in a different order shows which packages get downgraded by installing Dash and cause issues:
- start with an empty project
- adding DifferentialEquations works
- add Dash, which downgrades several packages including DataStructures from 0.19 to 0.18, recompilation of BoundaryValueDiffEq subsequently fails
Workaround:
Pkg.develop("Dash") instead loads the latest repo version which has DataStructures 0.17 0.18 0.19 in its dependencies and allows the DifferentialEquations suite to rely on this latest version instead
While the issue is caused by Dash being outdated, my understanding is the dependencies declaration in DifferentialEquations should be held back to an older version if the DataStructures = 0.19 requirement can't be met.
Happy to try and help debug this further if needed.
Regards
--sob
关闭于 2026-04-20 1 条评论