JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
609 stars 251 forks source link

More direct resolver error when julia compat is a factor #3907

Open ericphanson opened 1 month ago

ericphanson commented 1 month ago

in https://discourse.julialang.org/t/unclear-error-message-when-trying-to-install-package-with-incompatible-julia-version it came up that the default resolver error could be made more clear when julia compat is a factor in the unresolvability of the package. Specifically, the user was using Julia 1.6 and tried to use EcologicalNetworksDynamics whose latest version needs v1.10. They got this message:

(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

This is confusing since it is not clear what SciMLBase has to do with it at first. I think this message would work better if the first line showed which versions of EcologicalNetworksDynamics were compatible with Julia 1.6 (somehow mentioning that the latest version is not compatible), and then showing for the versions which are compatible with Julia 1.6 what the issue is.