Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv export does not check for existence of groups when used with --frozen #10882

Open
gazpachoking opened this issue Jan 23, 2025 · 4 comments
Open
Assignees
Labels
enhancement New feature or improvement to existing functionality

Comments

@gazpachoking
Copy link

Summary

When doing a uv export with --group or --only-group, a non-zero exit code and error are normally shown.

$ uv export --only-group aoeu
error: Group `aoeu` is not defined in the project's `dependency-group` table

However, non-existent groups are not checked for when the --frozen flag is defined.

$ uv export --only-group aoeu --frozen
# This file was autogenerated by uv via the following command:
#    uv export --only-group aoeu --frozen

Platform

Windows 11 x86_64

Version

uv 0.5.23

Python version

3.11.0

@gazpachoking gazpachoking added the bug Something isn't working label Jan 23, 2025
@charliermarsh
Copy link
Member

Yeah I think this is fine. With --frozen, we don't require that all of the pyproject.toml files are available, since it's common for users to run this in a Docker layer, and only copy over the workspace root. So there actually can be groups referenced that aren't visible to the command.

@charliermarsh
Copy link
Member

We can maybe shift this to being based on the lockfile instead? So look at the lockfile to figure out the available groups, rather than looking at the pyproject.toml.

@gazpachoking
Copy link
Author

We can maybe shift this to being based on the lockfile instead? So look at the lockfile to figure out the available groups, rather than looking at the pyproject.toml.

That's actually exactly what I'm doing in a script right now when I found this issue. I tried to eliminate that check it in favor of uv export handling the erroring when I found out it doesn't.

@charliermarsh
Copy link
Member

Yeah, I think we should be able to fix it.

@charliermarsh charliermarsh added enhancement New feature or improvement to existing functionality and removed bug Something isn't working labels Jan 23, 2025
@charliermarsh charliermarsh self-assigned this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants