Opt-in for --upgrade
option when locking
#22
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
The
build
andlock
subcommands should provide a way to request thatuv 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 likepython -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:
--upgrade
a multi-use list option, like--include
, with apip
-style--upgrade :all:
option to explicitly opt-in to upgrading every layer that is being relocked.venvstacks.toml
rather than being something that is configurable on every locking requestThe 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.The text was updated successfully, but these errors were encountered: