You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose you have some dependencies in pyproject.toml, e.g.
dependencies = [
"pyyaml==6.0.2",
]
When I run uv pip compile, I get nicely sorted list of hashes:
❯ uv pip compile --generate-hashes pyproject.toml
Resolved 1 package in 292ms
# This file was autogenerated by uv via the following command:
# uv pip compile --generate-hashes pyproject.toml
pyyaml==6.0.2 \
--hash=sha256:01179a4a8559ab5de078078f37e5c1a30d76bb88519906844fd7bdea1b7729ff \
--hash=sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48 \
...
--hash=sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12 \
--hash=sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4
# via uv-export-order (pyproject.toml)
However, when I run uv export, the order of the hashes is "random".
❯ uv export
Using CPython 3.13.0
Resolved 2 packages in 1ms
# This file was autogenerated by uv via the following command:
# uv export
pyyaml==6.0.2 \
--hash=sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e \
--hash=sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba \
...
--hash=sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183 \
--hash=sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563
Of course, the ordering becomes clear when looking at the uv.lock file
Suppose you have some dependencies in
pyproject.toml
, e.g.When I run
uv pip compile
, I get nicely sorted list of hashes:However, when I run
uv export
, the order of the hashes is "random".Of course, the ordering becomes clear when looking at the
uv.lock
fileHowever, for comparability, it would be good to sort the hashes also when exporting. Maybe optionally using an option like
--sort-hashes
?(Running uv 0.5.2 on WSL2 Ubuntu noble.)
The text was updated successfully, but these errors were encountered: