-
Notifications
You must be signed in to change notification settings - Fork 943
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
Workspace exclusion does not work #7071
Comments
Thanks, this looks like a bug. I'll take a look today. |
To clarify, do you want |
Awesome thanks a lot!
Ideally I'd like to have |
No prob. Is |
I'm sorry, I see how my example can be confusing. We have a monorepo where we have multiple projects stored in the
Here
|
Ok thank you, I think I follow now. I just tested and it looks like Cargo (which we modeled our workspace discovery after) doesn't support this kind of interaction either. It makes sense that it doesn't work if you consider that excludes are applied after member discovery, and we discover by walking over directories. Though I'd argue that the error message is wrong:
It should instead say that we can't find a workspace member for I think you'll need a slightly different structure to make this work... One option is to avoid including [tool.uv.workspace]
members = ["projects/project-a", "projects/product-a/*", "projects/product-b/*"] Or: [tool.uv.workspace]
members = ["projects/project-*", "projects/product-a/*", "projects/product-b/*"] (I assume they don't actually follow that pattern.) Or you could put all the projects in a subdirectory of their own, like |
Ok, this layout actually works after #7175: [project]
name = "projects"
version = "0.1.0"
description = "Add your description here"
requires-python = ">=3.12"
dependencies = []
[tool.uv]
package = false
[tool.uv.workspace]
members = ["projects/*", "projects/product-a/*", "projects/product-b/*"]
exclude = ["projects/product-a", "projects/product-b"] |
uv platform: Fedora 40
uv version:
uv 0.4.5
Hello,
First of all, thanks a lot for
uv
, it's an awesome tool!I'm trying to migrate my current project from
poetry
touv
by leveraging the workspace functionality. I have the following projects structure:The root
pyproject.toml
, the workspace root, is defined as:However,
uv lock
(or basically anyuv
command) fails this the following error message:even if
projects/b
is explicitly excluded.I've also tried to remove the members entry
projects/b/*
, but it fails with the same error message.Thanks a lot again!
The text was updated successfully, but these errors were encountered: