Skip to content
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

Conversation

IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Dec 6, 2024

src/Operations.jl Outdated Show resolved Hide resolved
@tecosaur
Copy link
Contributor

tecosaur commented Dec 9, 2024

Nit/preference: I feel like the "different version" loaded bit of the "different version loaded" is a bit redundant, just having [loaded: v1.6.3] in yellow would be enough IMO.

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
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IanButterworth IanButterworth merged commit e7c37f3 into JuliaLang:master Dec 9, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants