Allow workspace root to override member non-workspace sources#18954
Draft
zanieb wants to merge 1 commit intoastral-sh:mainfrom
Draft
Allow workspace root to override member non-workspace sources#18954zanieb wants to merge 1 commit intoastral-sh:mainfrom
zanieb wants to merge 1 commit intoastral-sh:mainfrom
Conversation
… for workspace members
When a workspace member (e.g., `app-a`) declares a non-workspace source (Git, path, etc.)
for another workspace member (e.g., `lib-x`) in its `tool.uv.sources`, but the workspace
root declares `lib-x = { workspace = true }`, fall back to the workspace root's source
instead of raising a `NonWorkspaceSource` error.
This supports the pattern where members declare Git sources for standalone use outside
the workspace, while the workspace root overrides them as workspace sources when
developing within the monorepo.
The regression was introduced in v0.9.3 when commit b151e0e fixed workspace member
glob normalization for `./` prefixed paths. Before that fix, workspaces using
`members = ["./packages/..."]` didn't properly discover members from child directories,
so the workspace member source check didn't fire.
Fixes astral-sh#18232
https://claude.ai/code/session_01XBDgKsN3dyqoucYic8YNGn
578e079 to
ca1a046
Compare
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.
Closes #18232 which regressed due to #16296