astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
26.1k stars 762 forks source link

`uv sync --locked --no-build --no-install-project` fails. #9016

Closed heckad closed 1 day ago

heckad commented 2 days ago

If use uv sync --locked --no-build --no-install-project command that error will occurred

warning: Failed to validate existing lockfile: Distribution `project==0.0.0a0 @ editable+.` can't be installed because it is marked as `--no-build` but has no binary distribution
Resolved 29 packages in 17ms
error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`.

If remove --locked argument then all works fine, but the lock file doesn't change. It's strange that he wants to update the log file and doesn't do this. Also if remove --no-build but left --locked then everything goes well too.

uv 0.5.1

charliermarsh commented 2 days ago

I guess I'd consider it a bug, sort of a strange interaction.

charliermarsh commented 1 day ago

Does uv sync --frozen --no-build --no-install-project work?

heckad commented 1 day ago

Yes, it does