Closed IanButterworth closed 2 years ago
AFAICT the two situations that hit this error...
...are indistinguishable. The only thing that might distinguish them would be if dev-ed packages were marked with a flag, but even then there are other ways that packages are actively worked on.
So I think that makes the error message addition in https://github.com/JuliaLang/julia/pull/42822 a reasonable improvement here
julia> using Images
[ Info: Precompiling Images [916415d5-f1e6-5110-898d-aaa5f9f070e0]
ERROR: LoadError: ArgumentError: Package SpecialFunctions does not have IrrationalConstants in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
to ensure all packages in the environment are installed.
- If you have SpecialFunctions checked out for development and have
added IrrationalConstants as a dependency but haven't updated your primary
environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with SpecialFunctions
In the example below, if a package is present in and installed from a parent stacked env (
v1.8
), and also in a active non-instantiated manifest (DataScience
), but something about the version or versions of its deps is different, the error message given when loading seems confusing or just wrong. Conversely, without the overlap with the stacked env the error message and suggestion to instantiate is very clear and helpful.It seems like a side-effect of https://github.com/JuliaLang/julia/pull/27932 ? https://github.com/JuliaLang/julia/pull/42822 was an attempt to adapt the error message to be more helpful, but I think the error path may just be wrong.
If you then remove
Images
from the v1.8 environment the error message seems to give the correct error and advice