Unclear error message when trying to install package with incompatible julia version

Our package’s Project.toml states the following:

[compat]
julia = "1.10"

As a consequence, issuing the following from a previous version of julia fails:

$ ../julia-1.6.7/bin/julia --project=.
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.7 (2022-07-19)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(test) pkg> add EcologicalNetworksDynamics
  Installing known registries into `~/.julia`
       Added registry `General` to `~/.julia/registries/General`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package SciMLBase [0bca4576]:
 SciMLBase [0bca4576] log:
 ├─possible versions are: 1.0.0-2.38.0 or uninstalled
 ├─restricted by compatibility requirements with EcologicalNetworksDynamics [2fd9189a] to versions: 2.30.0-2.38.0
 │ └─EcologicalNetworksDynamics [2fd9189a] log:
 │   ├─possible versions are: 0.2.0 or uninstalled
 │   └─restricted to versions * by an explicit requirement, leaving only versions 0.2.0
 └─restricted by julia compatibility requirements to versions: 1.0.0-2.6.0 or uninstalled — no versions left

However, it is not super-clear from that error message that julia version is the problem here.

Can this be made clearer? Has this been already discussed?

I think one difficulty is that Pkg will try to see if it can load an older version of your package which is compatible with Julia 1.6.7. So that’s where the SciMLBase stuff comes from: it tries to load older EcologicalNetworksDynamics, then finds that’s incompatible with the versions of SciMLBase that are allowed by the compat bounds. So I think one issue is that Pkg doesn’t know if the main problem is that the latest EcologicalNetworksDynamics is incompatible with Julia 1.6.7, or if its that SciMLBase won’t allow earlier versions of EcologicalNetworksDynamics.

(Not saying the message can’t be improved, just saying the situation Pkg is in is slightly more complicated than it sounds like at first).

2 Likes

I see, thank you for clarifying @ericphanson :slight_smile: Do you think it would be a good idea then that the message clarifies that either there is a problem with Julia version or with the SCIML package, instead of just outputting the possible SCIML package problem ? Maybe this is worth opening a dedicated issue to Julia?

I think the fact that Pkg’s error messages are often confusing is mostly a known problem, so a very general issue is not necessarily helpful, but in this case there is probably something more concrete that can be done. I filed More direct resolver error when julia compat is a factor · Issue #3907 · JuliaLang/Pkg.jl · GitHub to try to raise the problem and a potential solution to the Pkg developers.

1 Like