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

Adding git tags to cache keys causes pyproject.toml parse error #8421

Closed
kwaegel opened this issue Oct 21, 2024 · 1 comment · Fixed by #8422
Closed

Adding git tags to cache keys causes pyproject.toml parse error #8421

kwaegel opened this issue Oct 21, 2024 · 1 comment · Fixed by #8422
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@kwaegel
Copy link

kwaegel commented Oct 21, 2024

When I try to use the code suggested in the uv caching of dynamic metadata help doc to include git tags, I get a parse error. I suspect this is just a typo in the docs.

Minimal pyproject.toml file:

[project]
name = "uv-cache-test"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = []

[tool.uv]
cache-keys = [{ git = { commit = true, tag = true } }]

Error message:

$ uv sync
warning: Failed to parse `pyproject.toml` during settings discovery:
  TOML parse error at line 10, column 14
     |
  10 | cache-keys = [{ git = { commit = true, tag = true } }]
     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  data did not match any variant of untagged enum CacheKey

If I change this to tags = true (note the plural), it doesn't report an error, so this might just be a typo in the docs.

uv 0.4.25

@charliermarsh
Copy link
Member

Yeah that's just a typo. Thanks.

@charliermarsh charliermarsh added the documentation Improvements or additions to documentation label Oct 21, 2024
@charliermarsh charliermarsh self-assigned this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants