uv
Perform lock in `uv sync` by default
#4839
Merged

Perform lock in `uv sync` by default #4839

charliermarsh merged 1 commit into main from charlie/lock-sync
charliermarsh
charliermarsh326 days ago

Summary

  • uv sync will now lock by default.
  • uv sync --locked will lock, and error if the generated lock does not match uv.lock on-disk.
  • uv sync --frozen will skip locking and just use uv.lock.

Closes #4812.
Closes #4803.

charliermarsh charliermarsh added preview
charliermarsh charliermarsh force pushed from 9683642f to c5b2c775 326 days ago
charliermarsh
charliermarsh326 days ago

Needs tests.

charliermarsh charliermarsh force pushed from c5b2c775 to 4618e4f2 326 days ago
charliermarsh charliermarsh requested a review from zanieb zanieb 326 days ago
charliermarsh charliermarsh requested a review from konstin konstin 326 days ago
charliermarsh charliermarsh force pushed from 4618e4f2 to a25acfe9 326 days ago
konstin
konstin325 days ago

Shouldn't locked check that the lock fulfills the requirements, as opposed to that the lock is the latest possible lock wrt to pypi?

What are the use cases of --frozen where you wouldn't use --locked?

charliermarsh
charliermarsh325 days ago

I thought locked was about ensuring that the lockfile wouldn’t be updated by a “lock” operation. We don’t upgrade without —upgrade anyway.

charliermarsh
charliermarsh325 days ago

I think having an operation that only installs, and doesn’t resolve at all, seems really useful! Even just for my own sanity and testing.

konstin
konstin324 days ago

I see, i got confused because we don't pass existing_lock to the locking process, but that has another uv.lock read to extract preferences.

konstin
konstin approved these changes on 2024-07-07
charliermarsh
charliermarsh322 days ago

@konstin - I'll change it such that we pass the lockfile to that call, to make it clearer / less implicit (and also more efficient).

charliermarsh charliermarsh force pushed from a25acfe9 to edc93e26 322 days ago
charliermarsh charliermarsh force pushed from edc93e26 to f484b321 322 days ago
charliermarsh charliermarsh force pushed from f484b321 to 23369ced 322 days ago
charliermarsh charliermarsh enabled auto-merge (squash) 322 days ago
charliermarsh Perform lock in uv sync by default
652427b6
charliermarsh charliermarsh force pushed from 23369ced to 652427b6 322 days ago
disabled auto-merge 322 days ago
Manually disabled by user
charliermarsh charliermarsh enabled auto-merge (squash) 322 days ago
disabled auto-merge 322 days ago
Manually disabled by user
charliermarsh charliermarsh merged 540ff243 into main 322 days ago
charliermarsh charliermarsh deleted the charlie/lock-sync branch 322 days ago

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone