-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn when a package loads a dependencies that already got loaded and that dependency has a different version than in the current manifest. #32906
Comments
Just as a FYI, this is actually the reason why we don't load any packages into the REPL process in the VS Code extension as a general policy. |
This has occured in the wild now, with a custom For more information, see this thread on discourse. |
Another thread, this time with IJulia. The issue seems to happen in Atom as well, which makes sense if we think about how both of them work with code loading (being intrusive in the environments and all that). |
Since it happens with The “general” solution should be to load packages in such an order that the versions of their dependencies grow maximally while obeying all versions bounds. |
Imagine the following scenario: A user starts Julia in Juno (which loads a bunch of dependencies into Julia at startup). They then activate their project and loads a package. If that package shares any dependencies with Juno, the versions of the dependencies Juno used will be used for the package. These versions might be completely incompatible with the current project and can lead to silent errors in the code running.
Loading packages, changing project, and then loading more packages always have this risk but in the case where packages are loaded at startup, it might be hard to realize it is happening.
It might, therefore, make sense to warn in the case where a package tries to load a dependency and code loading sees that the dependency with that UUID is already loaded but at a different version than in the current project.
It could be argued that anyone that wants real reproducibility should run with a custom
LOAD_PATH
to only have the current project as the entry but I think that is quite rare in practice.The text was updated successfully, but these errors were encountered: