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

Running uv sync --locked asked to update uv.lock even after uv lock #8581

Closed
ekzhu opened this issue Oct 25, 2024 · 4 comments · Fixed by #8598
Closed

Running uv sync --locked asked to update uv.lock even after uv lock #8581

ekzhu opened this issue Oct 25, 2024 · 4 comments · Fixed by #8598
Assignees
Labels
bug Something isn't working

Comments

@ekzhu
Copy link

ekzhu commented Oct 25, 2024

To repreduce:

uv lock
uv sync --locked
error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`.

uv 0.4.27

@jackgerrits
Copy link

Issue should be reproducible on our workspace here:

https://github.com/microsoft/autogen/tree/main/python

@zanieb zanieb added the bug Something isn't working label Oct 26, 2024
@charliermarsh
Copy link
Member

Thanks for the repro.

@charliermarsh
Copy link
Member

Apologies. Fixed in the next release. You can also workaround it by removing the empty dev-dependencies list here (we weren't handling the empty case correctly when validating): https://github.com/microsoft/autogen/blob/3fe0f9e97d67a67f4027a92f458cb4842b3db43f/python/packages/autogen-agentchat/pyproject.toml#L22.

charliermarsh added a commit that referenced this issue Oct 26, 2024
## Summary

It turns out we were omitting empty dependency groups from the lockfile
metadata, which was then causing us to reject locks when empty groups
were defined.

We now include them (that section of the lock is meant to be a true
representation of the metadata, and an empty-but-defined group is
different from an absent group), though we can ignore them for
validation, since it doesn't affect any behavior.

Closes #8581.
@jackgerrits
Copy link

Thanks so much for the quick fix and explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants