fix: reinstall when registry install collides with non-registry lock entry#6213
Merged
ruben-arts merged 2 commits intoMay 28, 2026
Merged
Conversation
…registry lock entry When a package was installed from the PyPI registry but the lock file now points at a git URL or direct archive URL with the same version, the validation logic short-circuited on the version match and kept the stale registry build in place. Treat any direct/git URL or path in the lock as a source mismatch in the `Registry` branch. Fixes prefix-dev#2677.
ruben-arts
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When a PyPI package was previously installed from the registry but the lock file now points at a git or direct URL source with the same version number, pixi was leaving the stale registry build in place instead of reinstalling from the locked source. Users hit this when forking a package and pinning their fork via
{ git = "..." }: the lock file was correct, butpixi runkept executing the upstream PyPI code until the fork's version was manually bumped.This change makes pixi reinstall in that situation so the package on disk matches the lock file.
Fixes #2677
Fixes #6190
How Has This Been Tested?
Added two regression tests in
pixi_install_pypicovering the git source and direct archive source variants of the collision. Both fail before the fix and pass after. Full crate test suite passes.AI Disclosure
Tools: Claude
Checklist: