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

Opt-in for --upgrade option when locking #22

Open
ncoghlan opened this issue Oct 18, 2024 · 0 comments
Open

Opt-in for --upgrade option when locking #22

ncoghlan opened this issue Oct 18, 2024 · 0 comments
Labels
Affects: Command Line Affects the command line interface Affects: Python API Affects the public Python API of the project Category: Enhancement New feature or request

Comments

@ncoghlan
Copy link
Collaborator

The build and lock subcommands should provide a way to request that uv pip compile be called with the --upgrade option when locking.

The current approach to relocking-with-upgrades involves deleting the lock files prior to locking, which is OK when genuinely relocking everything (just delete the entire requirements subfolder), but annoying when using --include to request selective relocking.

As @neilmehta24 pointed out, a simple top level --upgrade option won't do the trick, since a command like python -m venvstacks lock --upgrade --include framework-torch --lock-derived might upgrade an app layer when we don't want it to.

Two potentially viable options would be:

  • make --upgrade a multi-use list option, like --include, with a pip-style --upgrade :all: option to explicitly opt-in to upgrading every layer that is being relocked.
  • make the decision on whether or not to eagerly upgrade everything part of the layer spec in venvstacks.toml rather than being something that is configurable on every locking request

The two approaches could also be combined, with venvstacks.toml specifying a default behaviour for each layer, and the CLI allowing that to be overridden for specific invocations.

@ncoghlan ncoghlan added Category: Enhancement New feature or request Affects: Python API Affects the public Python API of the project Affects: Command Line Affects the command line interface labels Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Command Line Affects the command line interface Affects: Python API Affects the public Python API of the project Category: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant