Omit workspace members for --no-sources commands#18859
Open
charliermarsh wants to merge 1 commit intomainfrom
Open
Omit workspace members for --no-sources commands#18859charliermarsh wants to merge 1 commit intomainfrom
--no-sources commands#18859charliermarsh wants to merge 1 commit intomainfrom
Conversation
3928e7a to
9c37ea9
Compare
9c37ea9 to
0ffa027
Compare
Member
|
Hm while this is technically more consistent I'm pretty worried it's not actually desirable. I'll try to think of an alternative. |
Member
Author
|
I think the thing we need to figure out is: if we always enforce that workspace dependencies are resolved to workspace members, is there a supported way to patch or override them? I'm concerned that we've probably recommended this exact approach in the past to solve that problem. |
Member
|
Separately from the existing behavior, I think I might expect |
Member
Author
|
(To be clear, I'm not sold on this change either -- oh, I guess I said this in the summary. I mostly care that the behavior is consistent between commands...) |
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.
Summary
In
uv syncand friends, even with--no-sources, we discover all the workspace members and send them in as local editable dependencies before we even hit lowering. This PR filters them out during discovery.Honestly, I'm not sure if we want this behavior. It means that if you have a member that depends on a workspace member, and that dependency isn't available through another source (e.g., from PyPI), resolution will fail with
--no-sources, since we'll ignoreworkspace = true. But if we don't have this behavior, then we can't plausibly support replacing workspace dependencies with other dependencies via--no-sourcesas described in #18258. Semantically, though, ignoringworkspace = truedoes seem correct, and--no-sources-packageexists for more targeted usages.Closes #18258.