Skip to content

Commit

Permalink
Clarify behavior of of overrides in CLI reference (#7537)
Browse files Browse the repository at this point in the history
## Summary
Improve the description of override-dependencies based on the statement
in `concepts/resolution.md`: "As with constraints, overrides do not add
a dependency on the package and only take effect if the package is
requested in a direct or transitive dependency."

I tested it locally, `concepts/resolution.md` is correct. It would be
better to also include this in the Reference Chapter of the docs.
  • Loading branch information
YouJiacheng committed Sep 19, 2024
1 parent 6b08aae commit a235b7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/uv-workspace/src/pyproject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ pub struct ToolUv {
/// constituent packages, overrides are _absolute_, in that they completely replace the
/// requirements of any constituent packages.
///
/// Including a package as an override will _not_ trigger installation of the package on its
/// own; instead, the package must be requested elsewhere in the project's first-party or
/// transitive dependencies.
///
/// !!! note
/// In `uv lock`, `uv sync`, and `uv run`, uv will only read `override-dependencies` from
/// the `pyproject.toml` at the workspace root, and will ignore any declarations in other
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ While constraints are _additive_, in that they're combined with the requirements
constituent packages, overrides are _absolute_, in that they completely replace the
requirements of any constituent packages.

Including a package as an override will _not_ trigger installation of the package on its
own; instead, the package must be requested elsewhere in the project's first-party or
transitive dependencies.

!!! note
In `uv lock`, `uv sync`, and `uv run`, uv will only read `override-dependencies` from
the `pyproject.toml` at the workspace root, and will ignore any declarations in other
Expand Down

0 comments on commit a235b7d

Please sign in to comment.