mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Omit project name from workspace errors (#4299)
## Summary Because the workspace member itself is part of the resolution, adding the workspace name for the project leads to confusing errors, like: ``` ❯ cargo run lock --preview Compiling uv v0.2.11 (/Users/crmarsh/workspace/puffin/crates/uv) Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.79s Running `/Users/crmarsh/workspace/puffin/target/debug/uv lock --preview` × No solution found when resolving dependencies: ╰─▶ Because only albatross==0.1.0 is available and albatross==0.1.0 depends on anyio<=3, we can conclude that all versions of albatross depend on anyio<=3. And because bird-feeder==1.0.0 depends on anyio>=4.3.0,<5 and only bird-feeder==1.0.0 is available, we can conclude that all versions of albatross and all versions of bird-feeder are incompatible. And because albatross depends on albatross and bird-feeder, we can conclude that the requirements are unsatisfiable. ``` (Notice "albatross depends on albatross".)
This commit is contained in:
parent
cacd1a2b5a
commit
db84825908
7 changed files with 8 additions and 62 deletions
|
@ -192,13 +192,6 @@ impl Workspace {
|
|||
.collect()
|
||||
}
|
||||
|
||||
/// If there is a package at the workspace root, return it.
|
||||
pub fn root_member(&self) -> Option<&WorkspaceMember> {
|
||||
self.packages
|
||||
.values()
|
||||
.find(|package| package.root == self.root)
|
||||
}
|
||||
|
||||
/// The path to the workspace root, the directory containing the top level `pyproject.toml` with
|
||||
/// the `uv.tool.workspace`, or the `pyproject.toml` in an implicit single workspace project.
|
||||
pub fn root(&self) -> &PathBuf {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue