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

Enforce lockfile schema versions #8509

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Enforce lockfile schema versions #8509

merged 1 commit into from
Oct 24, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Oct 23, 2024

Summary

Historically, we haven't enforced schema versions. This PR adds a versioning policy such that, if a uv version writes schema v2, then...

  • It will always reject lockfiles with schema v3 or later.
  • It may reject lockfiles with schema v1, but can also choose to read them, if possible.

(For example, the change we proposed to rename dev-dependencies to dependency-groups would've been backwards-compatible: newer versions of uv could still read lockfiles that used the dev-dependencies field name, but older versions should reject lockfiles that use the dependency-groups field name.)

Closes #8465.

@charliermarsh charliermarsh force-pushed the charlie/lock-version branch 3 times, most recently from 7d63afb to 8817bea Compare October 23, 2024 20:22
@charliermarsh charliermarsh added enhancement New feature or improvement to existing functionality error messages Messaging when something goes wrong labels Oct 23, 2024
@charliermarsh charliermarsh merged commit 2651aee into main Oct 24, 2024
63 checks passed
@charliermarsh charliermarsh deleted the charlie/lock-version branch October 24, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality error messages Messaging when something goes wrong
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error or warn when uv.lock version is unsupported
2 participants