-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 if an already loaded package is attempted to be loaded from a different path #44329
Conversation
f2d1744
to
a1428a9
Compare
a5e1bdb
to
5cdb501
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a great improvement!
I may have a system in mind where the impact can be significant... |
I am not sure, you still have to do the UUID lookup which does a bunch of file system stuff that is checked for the duration of the |
I'm not sure this will work well for packages in the sysimage. |
I wonder if we should move this up a level in the call-stack (to |
This will need a rebase on master so that it picks up the Buildkite CI config. |
97f5b98
to
abb7e30
Compare
abb7e30
to
3c6f290
Compare
Latest demo
|
Now following messages are shorter
|
…rom a different path (JuliaLang#44329)" This reverts commit b51b809.
As a use case, let's say I want to try out some Revise version but I forgot that I have Revise loaded in my startup file. With this PR, one gets:
Oops, thanks Julia for warning me that I in fact did not load the version of the package that I thought I did.
This is a quite common source of confusion, for example, I remember IJulia loading some version of JSON that was incompatible with what many people had in their projects. Since IJulia loads the package into the same session as the user code, this lead to confusing behavior when users had a different JSON loaded than what they thought.
There is a cost to this in that we have to look up the path for the package even when it is already loaded. I have yet to do some benchmarks for this but I doubt it is significant.
I wonder how useful it is to write out the full path in the error message.