Precompilation failure caused by package dependency version

I am trying to install two packages ClimeTools and MultivariateStats. The former requires version 0.32.2 of the package StatsBase while the latter requires 0.33.21. This results in a conflict and prevents me from successfully precompiling both packages at the same time.

Here is the code to reproduce this problem:

# Entering Pkg mode
]active --temp
]add ClimateTools # It shows that [2913bbd2] + StatsBase v0.32.2
]add StatsBase # automated install v0.32.2 rather than the latest one
      Status `/tmp/jl_mYrz3B/Project.toml`
  [4f4ee721] ClimateTools v0.23.1
  [2913bbd2] StatsBase v0.32.2

Now, try to install MultivariateStats

]add MultivariateStats # fails to precompile
]precompile # precompilation of `MultivariateStats` fails again

If I specify a version for StatsBase, it will downgrade ClimeTools and cause the correspondent precompilation to fail."

]add StatsBase@33 # It shows that [4f4ee721] ↓ ClimateTools v0.23.1 ⇒ v0.13.0
]precompile # ClimeTools fails to precompile
      Status `/tmp/jl_mYrz3B/Project.toml`
  [4f4ee721] ClimateTools v0.13.0
  [6f286f6a] MultivariateStats v0.10.0
  [2913bbd2] StatsBase v0.33.21

Is there any trick to solve this problem? Thanks in advance!

It seems ClimateTools insists on old versions for a lot of packages (e.g. check out the large amount of unmerged CompatBot PRs Pull requests · JuliaClimate/ClimateTools.jl · GitHub )

One way around the issue for me was to start by pinning MultivariateStats and StatsBase to their newest versions and to install ClimateTools after that:

(climetoolstest) pkg> st
Status `/tmp/climetoolstest/Project.toml`
⌃ [4f4ee721] ClimateTools v0.13.0
  [6f286f6a] MultivariateStats v0.10.0
  [2913bbd2] StatsBase v0.33.21
Info Packages marked with ⌃ have new versions available

That is a pretty ancient version of ClimateTools though. Everything precompiles fine now (but keep in mind that Project.toml is not enough to fully define the system, you need Manifest.toml for that, because the order of installations might matter to the resolver).

My amateur guess is that somewhere deep in the mutual dependencies of these packages ClimateTools needs an old version of a package, which is listed as supported in the Project.toml file of MultivariateStats (or dependencies), but is not actually supported. Someone has release a new version of their package and has not noticed that they rely on a newer feature in one of their dependencies. That should be found and fixed, but I think it is much more urgent that someone goes through the CompatBot pull requests for ClimateTools.

1 Like