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

Add a "comprehensive" locking mode #2

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

Add a "comprehensive" locking mode #2

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 initial venvstacks locking mode operates by way of constraint files: when an upper layer depends on lower layers, the pinned requirements of the lower layers are used as constraints when compiling the requirements for the upper layer.

The key benefit of this approach is that it allows selective relocking of the upper layers, the key downside is that it can lead to resolution failures if the upper layer's dependencies specify a maximum version that is less than the version pinned by the lower layers.

An alternative locking strategy is available by allowing stack definitions to opt out of using uv pip compile to lock each environment individually, and instead use uv's notion of "workspaces" to map each layered environment to a non-package pyproject.toml file in a common workspace anchored on the relevant base runtime environment.

When using this locking mode, selective locking would no longer be available (since the entire workspace shares a single lockfile), but the locking process would have an improved ability to resolve potential conflicts between upper layer and lower layer transitive dependency declarations.

Note that the locking mode to use should be part of the venvstacks.toml stack definition file, rather than being specified on the command line when relocking the project. The initial version of that setting would support two modes, constraints (the default), and comprehensive (the new mode added to implement this feature request).

@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 18, 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