-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically detect workspace packages in
uv add
(#4557)
## Summary If the package _isn't_ marked as `workspace = true`, locking will fail given: ```rust let workspace_package_declared = // We require that when you use a package that's part of the workspace, ... !workspace.packages().contains_key(&requirement.name) // ... it must be declared as a workspace dependency (`workspace = true`), ... || matches!( source, Some(Source::Workspace { // By using toml, we technically support `workspace = false`. workspace: true, .. }) ) // ... except for recursive self-inclusion (extras that activate other extras), e.g. // `framework[machine_learning]` depends on `framework[cuda]`. || &requirement.name == project_name; if !workspace_package_declared { return Err(LoweringError::UndeclaredWorkspacePackage); } ``` Closes #4552.
- Loading branch information
1 parent
a328c7b
commit 45c271d
Showing
6 changed files
with
46 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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