-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
status: highlight when deps have different loaded versions #4109
status: highlight when deps have different loaded versions #4109
Conversation
Nit/preference: I feel like the "different version" loaded bit of the "different version loaded" is a bit redundant, just having |
…utterworth/Pkg.jl into ib/status_different_loaded_versions
m = get(Base.loaded_modules, pkgid, nothing) | ||
if m isa Module && pkg_spec.version !== nothing | ||
loaded_path = pathof(m) | ||
env_path = Base.locate_package(pkgid) # nothing if not installed |
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.
There are so many ways to get the path to a package, could also for example use pkgorigins
but this should be fine as well.
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.
pkgorigins
only works for loaded packages? This line's the src as found based on the env, i.e. what loading would find. I thought locate_package
would be the closest to the actual loading mechanics? If there's a more proper way then let's use it
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'll go ahead, the docs seem to support this being the correct API https://github.com/JuliaLang/julia/blob/e0656ac017a427f739f985809017a33c269b3af1/base/loading.jl#L496-L512
See JuliaLang/julia#56769