Skip to content

Commit

Permalink
Improve docs: settings/override-dependencies
Browse files Browse the repository at this point in the history
Stated in `concepts/resolution`: "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."
  • Loading branch information
YouJiacheng committed Sep 19, 2024
1 parent 7778a11 commit 39d5839
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 39d5839

Please sign in to comment.