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

feat: add --no-default-groups flag #10618

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mkniewallner
Copy link
Contributor

Summary

Closes #10592.

Test Plan

Snapshot tests.

@zanieb
Copy link
Member

zanieb commented Jan 14, 2025

Should we have --no-groups or --no-default-groups?

@zanieb
Copy link
Member

zanieb commented Jan 14, 2025

I think the latter might be more versatile.

@mkniewallner
Copy link
Contributor Author

Would --no-default-groups disable tool.uv.default-groups under the hood, meaning that it would set it back to dev section only by default? If so, I believe the implementation should be changed a bit, as in that case we should not exclude all groups, but include dev group unless --no-dev is also specified?

@zanieb
Copy link
Member

zanieb commented Jan 14, 2025

I think it would exclude all groups provided via default-groups including our default dev behavior. The difference would be like...

  • --group foo --group bar --no-groups: no groups selected
  • --group foo --group bar --no-default-groups: foo and bar still selected

@mkniewallner mkniewallner force-pushed the feat/add-no-groups-flag branch from 3fed672 to 8265ef7 Compare January 15, 2025 00:58
@mkniewallner mkniewallner changed the title feat: add --no-groups flag feat: add --no-default-groups flag Jan 15, 2025
@mkniewallner mkniewallner marked this pull request as ready for review January 15, 2025 01:09
Comment on lines +68 to +71
/// Explicitly include dependencies from the specified groups.
///
/// If the list is empty, no group will be included.
IncludeExplicitly(Vec<GroupName>),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't find a better naming and description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to disable all dependency groups in uv sync
3 participants