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

Confusing failure to deserialize cache entry when running older uv with uv #8488

Closed
adamtheturtle opened this issue Oct 23, 2024 · 2 comments · Fixed by #8500
Closed

Confusing failure to deserialize cache entry when running older uv with uv #8488

adamtheturtle opened this issue Oct 23, 2024 · 2 comments · Fixed by #8500
Labels
error messages Messaging when something goes wrong

Comments

@adamtheturtle
Copy link
Contributor

The error I see:

> uv --version
uv 0.4.25 (Homebrew 2024-10-21)
> uv run --with=uv==0.4.21 uv run python
warning: No `requires-python` value found in the workspace. Defaulting to `>=3.13`.
warning: `VIRTUAL_ENV=/Users/adam/Library/Caches/uv/archive-v0/sbP0Zf_rJKTe35hA0v5yT` does not match the project environment path `.venv` and will be ignored
warning: No `requires-python` value found in the workspace. Defaulting to `>=3.13`.
error: Failed to generate package metadata for `example==0.0.0 @ editable+.`
  Caused by: Failed to deserialize cache entry
  Caused by: data did not match any variant of untagged enum CacheInfoWire

A minimal setup for this:

# pyproject.toml
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools"]

[project]
name = "example"
dynamic = ["version"]

[tool.setuptools.packages.find]
where = ["src"]
# src/example/__init__.py

print("Hello")

I spent some time debugging that a script called by uv run was running a different version of uv.

I expect that either this will "just work", or that the error message would be clearer to help me understand the problem.

@adamtheturtle
Copy link
Contributor Author

The policy / documentation which comes from #8367 is helpful for understanding, but I think it would be better to have uv output something more understandable.

@konstin konstin added the bug Something isn't working label Oct 23, 2024
@charliermarsh charliermarsh added error messages Messaging when something goes wrong and removed bug Something isn't working labels Oct 23, 2024
@charliermarsh
Copy link
Member

(Relabeling since this isn't a bug, it's just an error message issue.)

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

We no longer need this struct; we bumped the cache bucket version
anyway, so the `Timestamp` variant is never encountered. This means we
get real Serde error messages.

Closes #8488.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Messaging when something goes wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants