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

Using git versioning with a workspace module yields unwanted changes to uv.lock #10054

Closed
wlach opened this issue Dec 20, 2024 · 3 comments
Closed

Comments

@wlach
Copy link

wlach commented Dec 20, 2024

I'm maintaining various libraries inside a monorepo using uv's wonderful workspaces feature.

Our pyproject.toml looks something like this:

[project]
name = "monorepo"
version = "0.1.0"
dependencies = ["mymodule[tests]"]

[tool.uv.workspace]
members = ["src/*"]

[tool.uv.sources]
mymodule = { workspace = true }

mymodule uses git-based versioning using setuptools-git-versioning. This gives it a new version like 0.1.post31+git.fc7087bf which we want for various internal reasons which I won't go into here. Unfortunately since that version is linked to the repository, making any change will result in its uv sync thinking it needs to update version of the module. The relevant section in uv.lock which continuously gets updated is:

[[package]]
name = "mymodule"
version = "0.1.post31+git.fc7087bf"
source = { editable = "src/mymodule" }
dependencies = [ ... ]

It would be great if we could somehow just skip writing the version for editable modules inside uv.lock, since it really shouldn't matter (they're just going to get installed via the filesystem anyway).

@wlach
Copy link
Author

wlach commented Dec 20, 2024

I thought this might be related, but appears not to be (I get the same issue with the latest version of uv, 0.5.11 as of this writing): #9549

@my1e5
Copy link
Contributor

my1e5 commented Dec 20, 2024

@wlach wlach closed this as completed Dec 20, 2024
@wlach
Copy link
Author

wlach commented Dec 20, 2024

ah yep, you're totally right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants