Needs tests.
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
?
I thought locked was about ensuring that the lockfile wouldn’t be updated by a “lock” operation. We don’t upgrade without —upgrade anyway.
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.
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 - I'll change it such that we pass the lockfile to that call, to make it clearer / less implicit (and also more efficient).
Login to write a write a comment.
Summary
uv sync
will now lock by default.uv sync --locked
will lock, and error if the generated lock does not matchuv.lock
on-disk.uv sync --frozen
will skip locking and just useuv.lock
.Closes #4812.
Closes #4803.