Skip to content

Conversation

@terror
Copy link
Contributor

@terror terror commented Nov 21, 2025

Part of #16771

This diff introduces --exclude-packages to pip {compile, install, tool install}, accepting comma-delimited package names (with --exclude-package as an alias) to exclude packages without an excludes file.

#[arg(long, alias = "exclude", env = EnvVars::UV_EXCLUDE, value_delimiter = ' ', value_parser = parse_maybe_file_path)]
pub excludes: Vec<Maybe<PathBuf>>,

/// Exclude the given package names from resolution.
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to copy the additional content from --excludes above.

When a package is excluded, it will be omitted from the dependency list entirely and its own dependencies will be ignored during the resolution phase

Copy link
Member

Choose a reason for hiding this comment

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

I'd also just say "Exclude the given packages from resolution".

We'll often also say something like "May be provided multiple times or multiple values can be provided separated by commas"

@zanieb
Copy link
Member

zanieb commented Nov 21, 2025

I need to think a bit more about what we want long-term, i.e., if we want to go this route or something like --exclude / --exclude-file long-term. I'm wary of adding more options without a clear plan since it'll just make it harder.

Otherwise, this looks good!

@zanieb zanieb self-assigned this Nov 21, 2025
@terror
Copy link
Contributor Author

terror commented Nov 21, 2025

I need to think a bit more about what we want long-term, i.e., if we want to go this route or something like --exclude / --exclude-file long-term. I'm wary of adding more options without a clear plan since it'll just make it harder.

Otherwise, this looks good!

I'm more a fan of what you just mentioned, i.e. --exclude / --exclude-file. IMO, the generic --exclude taking package names makes a bit more sense here.

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.

2 participants