Fix duplicate installs from sibling Git worktrees#1639
Open
StellaHuang95 wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8f42031a-bd90-4448-bffe-b5c0ab522b6d
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.
Context
Fixes #1627.
Quick Create discovers workspace dependencies and installs local
pyproject.tomlprojects in editable mode. When a workspace contains sibling Git worktrees such as:both files previously contributed editable arguments to the same resolver transaction:
pip and uv treat those paths as two sources for the same distribution and reject the request.
Changes
[project].namefrom each discoveredpyproject.toml.My_App,my.app, andmy-appare treated as the same package.Result
When Quick Create targets a specific worktree, only that checkout is installed:
Distinct distributions in a normal monorepo remain installable together, and single-project workspaces keep their existing behavior.
Scope and known limitations
pyproject.tomlmetadata. Requirements files remain unchanged and worktree-unscoped; conflicting siblingrequirements.txtfiles, or requirements that themselves contain duplicate editable paths, can still conflict.pyproject.tomland requirements arguments compared with the previous asynchronous implementation. This is worth reviewing because uv uses user input order as one resolver-priority tie-breaker.Validation
npm run compile-testsnpm run lintgetProjectInstallablesuites: 16 passing