Skip to content

fix: include precise in CheckoutGit dedup key#6094

Merged
wolfv merged 1 commit into
prefix-dev:mainfrom
baszalmstra:claude/investigate-issue-6073-WzZUz
May 12, 2026
Merged

fix: include precise in CheckoutGit dedup key#6094
wolfv merged 1 commit into
prefix-dev:mainfrom
baszalmstra:claude/investigate-issue-6073-WzZUz

Conversation

@baszalmstra

Copy link
Copy Markdown
Contributor

Description

The CheckoutGit dedup key dropped precise and compute rebuilt the GitUrl from the reference alone, so resolver.fetch always re-resolved to the branch HEAD. Two callers with different pinned commits on the same branch collided on one cache slot, and checkout_pinned_source(commit_A) could return a SourceCheckout whose path pointed at commit B's checkout while pinned reported commit A.

Effect on #6073: the build backend read the latest source manifest (with the new setuptools = "<82.0.0") while the lock-file still carried commit A's solved host_packages (setuptools 82.0.1), producing the silent setuptools <82.0.0 | 82.0.1 mismatch in the build env.

Fix: key CheckoutGit on the full GitUrl and pass it through unchanged so the resolver honours precise when set.

Fixes #6073

How Has This Been Tested?

Reproducer matching the issue (caiman-like path dep depending on fastplotlib-like git dep):

  1. pixi install against fastplotlib-like @ commit A (no constraint), which locks commit A and resolves setuptools 82.0.1 in the host env. Consistent.
  2. Push commit B tightening setuptools = "<82.0.0"; pixi install (no update), and the lock-file stays on commit A, no rebuild, no mismatch table. Before this fix, step 2 produced setuptools <82.0.0 | 82.0.1.
  3. pixi update fastplotlib-like + pixi install, the lock-file advances to commit B and the host env resolves setuptools 81.0.0. Constraint honoured.

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 commented my code, particularly in hard-to-understand areas

@baszalmstra baszalmstra requested a review from hunger May 12, 2026 13:51
@baszalmstra baszalmstra force-pushed the claude/investigate-issue-6073-WzZUz branch from c02fd51 to 152a826 Compare May 12, 2026 14:41
`CheckoutGit::new` keyed only on `RepositoryReference` (URL +
reference) and `compute` rebuilt `GitUrl` from the reference alone, so
`resolver.fetch` always received `precise = None` and re-resolved to
the branch's current HEAD. Two callers with different pinned commits
on the same branch collided on a single cache slot, and
`checkout_pinned_source(commit_A)` could silently return a
`SourceCheckout` whose `path` pointed at commit B's checkout while
`pinned` reported commit A. That's how a freshly-fetched manifest's
tightened `host-dependencies` leaked into a build whose lock-file
still pinned the older commit's host_packages, producing the silent
`setuptools <82.0.0 | 82.0.1` mismatch in prefix-dev#6073.

Key on the full `GitUrl` and pass it through unchanged so the resolver
honours `precise` when set and advances to HEAD only when not.
@baszalmstra baszalmstra force-pushed the claude/investigate-issue-6073-WzZUz branch from 152a826 to 71656a8 Compare May 12, 2026 14:51
@wolfv wolfv merged commit 8f936df into prefix-dev:main May 12, 2026
37 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.

setuptools version seems to not conform to spec when installing from source using pixi build

3 participants