ODE.jl: PolyCompat not defined

Hi all,

I am trying to run ODE.jl in Julia 1.5, but I get the following error when loading the package. I have installed Polynomials using Pkg.add(). I know there are better solvers available in DifferentialEquations.jl, but I want to use ode45 to try to replicate some calculations that were done in Matlab.

julia> using Polynomials, ODE
[ Info: Precompiling ODE [c030b06c-0b6d-57c2-b091-7029874bd033]
ERROR: LoadError: UndefVarError: PolyCompat not defined
Stacktrace:
[1] include(::Function, ::Module, ::String) at .\Base.jl:380
[2] include(::Module, ::String) at .\Base.jl:368
[3] top-level scope at none:2
[4] eval at .\boot.jl:331 [inlined]
[5] eval(::Expr) at .\client.jl:467
[6] top-level scope at .\none:3
in expression starting at C:\Users\caioh.julia\packages\ODE\foTmY\src\ODE.jl:7
ERROR: Failed to precompile ODE [c030b06c-0b6d-57c2-b091-7029874bd033] to C:\Users\caioh.julia\compiled\v1.5\ODE\yzDex_OpTrA.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1305
[3] _require(::Base.PkgId) at .\loading.jl:1030
[4] require(::Base.PkgId) at .\loading.jl:928
[5] require(::Module, ::Symbol) at .\loading.jl:923

You must have an older version of Polynomials. I think v0.6 and v0.7 (allowed in the Project.toml file of ODE.jl) don’t need to use PolyCompat.

The ode45 there isn’t going to be all that similar. DP5 of OrdinaryDiffEq.jl is going to be closer (to the original dopri).

Thanks! Indeed, DP5() was close enough.

My experience on this error message, for fellow future newbies who were confused like me – I had to remove the old versions of ODE and Polynomials from my package, then re-add them. I.e.:

]
activate .
rm Polynomials
rm ODE
(backspace)

(then I exited, re-started, came back)

]
activate .
add Polynomials
add ODE
(backspace)

To check versions before and after:

using Pkg
Pkg.status(“Polynomials”)
Pkg.status(“ODE”)