-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add --no-group support to CLI
#8477
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
Conversation
5a3dc50 to
33d104d
Compare
crates/uv-cli/src/lib.rs
Outdated
| /// Exclude dependencies from the specified local dependency group. | ||
| /// | ||
| /// May be provided multiple times. | ||
| #[arg(long, conflicts_with("only_group"))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this conflicts? What if I do --only-group foo --only-group bar --no-group foo? Per previous discussions about overriding prior options, this seems nice to permit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I went back and forth on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I trust your judgement, I was just surprised.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just added a bit of complexity to the implementation, so I had punted it. Makes sense though.
| "#, | ||
| )?; | ||
|
|
||
| uv_snapshot!(context.filters(), context.sync().arg("--no-group").arg("foo"), @r###" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about a test for --group foo --no-group foo?
(not necessarily in this function)
33d104d to
9c54dcc
Compare
## Summary Now that `default-groups` can include more than just `"dev"`, it makes sense to allow users to remove groups with `--no-group`.
## Summary Now that `default-groups` can include more than just `"dev"`, it makes sense to allow users to remove groups with `--no-group`.
## Summary Now that `default-groups` can include more than just `"dev"`, it makes sense to allow users to remove groups with `--no-group`.
## Summary Now that `default-groups` can include more than just `"dev"`, it makes sense to allow users to remove groups with `--no-group`.
## Summary Now that `default-groups` can include more than just `"dev"`, it makes sense to allow users to remove groups with `--no-group`.
Summary
Now that
default-groupscan include more than just"dev", it makes sense to allow users to remove groups with--no-group.