Skip to content

git-tag cache-keys not working if there are tags containing slash #10467

Closed
@snizovtsev

Description

I use slashes in git tags to separate workspace member from version, like:

$ git tag -l
py-consul/v1.5.3.post0
xyz

gives "1.5.3.post0" version to workspace member workspace/py-consul.

As so, I've each workspace member's pyproject.toml looks like this:

[project]
name = "py-consul"
dynamic = ["version", "x-run-hook"]

[tool.uv]
cache-keys = [{ git = { commit = true, tags = true } }, { file = "pyproject.toml" }]

[tool.hatch.version]
source = "my-plugin"

However I noticed uv won't bump my project version when I add or remove a second tag like xyz. It echos the following error in DEBUG log:

DEBUG Failed to read the current tags: failed to read from file `my-project/.git/refs/tags/py-consul`: Is a directory (os error 21)

Obviously, uv should be improved to walk entire .git/refs/tags directory instead of reading flat structure as it done now.

If nobody objects, I want to use this issue as my practice in Rust and plan to work on a fix in a next few days.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    git-tag cache-keys not working if there are tags containing slash · Issue #10467 · astral-sh/uv