uv/docs/concepts
Zanie Blue 8f71d239f8
Add support for `package`-level conflicts in workspaces (#14906)
Revives https://github.com/astral-sh/uv/pull/9130

Previously, we allowed scoping conflicting extras or groups to specific
packages, e.g. ,`{ package = "foo", extra = "bar" }` for a conflict in
`foo[bar]`. Now, we allow dropping the `extra` or `group` bit and using
`{ package = "foo" }` directly which declares a conflict with `foo`'s
production dependencies.

This means you can declare conflicts between workspace members, e.g.:

```
[tool.uv]
conflicts = [[{ package = "foo" }, { package = "bar" }]]
```

would not allow `foo` and `bar` to be installed at the same time.

Similarly, a conflict can be declared between a package and a group:

```
[tool.uv]
conflicts = [[{ package = "foo" }, { group = "lint" }]]
```

which would mean, e.g., that `--only-group lint` would be required for
the invocation.

As with our existing support for conflicting extras, there are
edge-cases here where the resolver will _not_ fail even if there are
conflicts that render a particular install target unusable. There's test
coverage for some of these. We'll still error at install-time when the
conflicting groups are selected. Due to the likelihood of bugs in this
feature, I've marked it as a preview feature.

I would not recommend reading the commits as there's some slop from not
wanting to rebase Andrew's branch.

---------

Co-authored-by: Andrew Gallant <andrew@astral.sh>
2025-08-08 07:44:58 -05:00
..
projects Bump version to v0.8.6 (#15137) 2025-08-07 16:17:14 +01:00
authentication.md Add support for `HF_TOKEN` (#14797) 2025-07-21 20:55:33 +00:00
build-backend.md Bump version to v0.8.6 (#15137) 2025-08-07 16:17:14 +01:00
cache.md Suggest `uv cache clean` prior to `--reinstall` (#14659) 2025-07-16 12:02:29 -04:00
configuration-files.md Remove the configuration section in favor of concepts / reference (#13842) 2025-06-05 17:09:49 +00:00
index.md Remove the configuration section in favor of concepts / reference (#13842) 2025-06-05 17:09:49 +00:00
indexes.md Allow users to override index `cache-control` headers (#14620) 2025-07-15 10:00:04 -04:00
preview.md Add support for `package`-level conflicts in workspaces (#14906) 2025-08-08 07:44:58 -05:00
python-versions.md Update documentation for preview flags (#14902) 2025-07-25 15:19:24 -05:00
resolution.md Move "Conflicting dependencies" to the "Resolution" page (#14633) 2025-07-15 16:47:43 -05:00
tools.md Support installing additional executables in `uv tool install` (#14014) 2025-07-30 14:50:24 -05:00