Skip to content

fix: reinstall when registry install collides with non-registry lock entry#6213

Merged
ruben-arts merged 2 commits into
prefix-dev:mainfrom
baszalmstra:claude/exciting-babbage-HmfzL
May 28, 2026
Merged

fix: reinstall when registry install collides with non-registry lock entry#6213
ruben-arts merged 2 commits into
prefix-dev:mainfrom
baszalmstra:claude/exciting-babbage-HmfzL

Conversation

@baszalmstra
Copy link
Copy Markdown
Contributor

@baszalmstra baszalmstra commented May 26, 2026

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, but pixi run kept 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_pypi covering 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

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude

Checklist:

  • I have performed a self-review of my own code
  • I have added sufficient tests to cover my changes.

…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.
@baszalmstra baszalmstra requested a review from tdejager May 26, 2026 13:00
@ruben-arts ruben-arts merged commit 01bd578 into prefix-dev:main May 28, 2026
38 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

3 participants