astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.88k stars 467 forks source link

`rye sync --update-all` should imply `UV_NO_CACHE=true` #1128

Open duijf opened 6 months ago

duijf commented 6 months ago

Steps to Reproduce

rye sync --update-all doesn't always update to the latest release.

It's a little hard to come up with an exact repro, since this depends on the contents of your uv cache. Roughly:

  1. Run rye sync on a pyproject.toml with a dependency on libfoo
  2. Publish a new version of libfoo to PyPI
  3. Run rye sync --update-all

Expected Result

The new version of libfoo is recorded in the lockfile.

Actual Result

I get output like this and the lockfiles are unchanged:

Reusing already existing virtualenv
Generating production lockfile: /path/to/project/requirements.lock
Generating dev lockfile: /path/to/project/requirements-dev.lock
Installing dependencies
Audited 60 packages in 1ms
Done!

If I disable the UV cache with UV_NO_CACHE=true rye sync -f --update-all, the lockfiles are updated as I'd expect.

Disabling the uv cache should be implied if the user passes --update-all.

Version Info

$ rye --version
rye 0.34.0
commit: 0.34.0 (1980-01-01)
platform: macos (aarch64)
self-python: cpython@3.12.3
symlink support: true
uv enabled: true

Stacktrace

No response

nrbnlulu commented 6 months ago

1080

related

ha5h6r000wn commented 4 months ago

Just tried out "rye sync -f --update-all" and it works for me (without the "UV_NO_CACHE=true" prefix). All packages have been forced to update to latest.