-
Notifications
You must be signed in to change notification settings - Fork 615
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
Load configuration options from workspace root #4295
Conversation
623d2da
to
1910c25
Compare
// configuration file. | ||
// 3. The nearest `uv.toml` file in the directory tree, starting from the current directory. If | ||
// found, this file is combined with the user configuration file. In this case, we don't | ||
// search for `pyproject.toml` files, since we're not in a workspace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rules are explained here, in more detail.
1910c25
to
98200f6
Compare
It's a bit confusing that configuration in a workspace member will effectively be ignored. Something to revisit in the future, I think. |
98200f6
to
20cc09f
Compare
That seems pretty problematic :D |
I know it's a hard question, but what do you think the semantics should be? None of the options are enforceable on a per-package basis. |
I'm not sure yet. I think I need to play with a real workspace setup first. I think we'd need to be able to map a tree of dependencies to their source project in the workspace to be able to enforce things, right? It seems like it would require a lot of changes. |
16de0ce
to
164b8e5
Compare
20cc09f
to
8c73a0a
Compare
8c73a0a
to
fcc0788
Compare
## Summary Previously, we wouldn't respect configuration files in directories _above_ a workspace root. But this is somewhat problematic, because any `pyproject.toml` will define a workspace root... Instead, I think we should _start_ the search at the workspace root, but go above it if necessary. Closes: #5929. See: #4295.
Previously, we wouldn't respect configuration files in directories _above_ a workspace root. But this is somewhat problematic, because any `pyproject.toml` will define a workspace root... Instead, I think we should _start_ the search at the workspace root, but go above it if necessary. Closes: #5929. See: #4295.
Summary
In a workspace, we now read configuration from the workspace root. Previously, we read configuration from the first
pyproject.toml
oruv.toml
file in path -- but in a workspace, that would often be the project rather than the workspace configuration.We need to read configuration from the workspace root, rather than its members, because we lock the workspace globally, so all configuration applies to the workspace globally.
As part of this change, the
uv-workspace
crate has been renamed touv-settings
and its purpose has been narrowed significantly (it no longer discovers a workspace; instead, it just reads the settings from a directory).If a user has a
uv.toml
in their directory or in a parent directory but is not in a workspace, we will still respect that use-case as before.Closes #4249.