-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
error messagesMessaging when something goes wrongMessaging when something goes wronghelp wantedContribution especially encouragedContribution especially encouraged
Description
uv shows an incorrect error message when the pyproject.toml
for a group doesn't exist, but somewhere above it there's a pyproject.toml
that isn't usable (but should not have been checked in the first place):
[project]
name = "uv"
version = "0.8.17"
[tool.uv]
managed = false
$ uv pip compile --group does/not/exist/pyproject.toml:dev
error: Failed to read dependency groups from: does/not/exist/pyproject.toml
Caused by: The project is marked as unmanaged: `/home/konsti/projects/foo`
Similarly, with an invalid pyproject.toml
that's unrelated to out attempt at reading a dependency group:
[project]
name = "uv%%%"
version = "0.8.17"
$ uv pip compile --group does/not/exist/pyproject.toml:dev
error: Failed to read dependency groups from: does/not/exist/pyproject.toml
Caused by: Failed to parse: `pyproject.toml`
Caused by: TOML parse error at line 2, column 8
|
2 | name = "uv%%%"
| ^^^^^^^
Not a valid package or extra name: "uv%%%". Names must start and end with a letter or digit and may only contain -, _, ., and alphanumeric characters.
We shouldn't read that pyproject.toml
at all, we should error directly when we don't find does/not/exist/pyproject.toml
.
Metadata
Metadata
Assignees
Labels
error messagesMessaging when something goes wrongMessaging when something goes wronghelp wantedContribution especially encouragedContribution especially encouraged