Clarify that uv run uses inexact syncing by default (#17366)
Closes #14230 Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -89,17 +89,25 @@ To opt-out of this behavior, use the `--no-editable` option.
|
||||
If the project does not define a build system, it will not be installed.
|
||||
See the [build systems](./config.md#build-systems) documentation for details.
|
||||
|
||||
### Retaining extraneous packages
|
||||
### Handling of extraneous packages
|
||||
|
||||
Syncing is "exact" by default, which means it will remove any packages that are not present in the
|
||||
lockfile.
|
||||
`uv sync` performs "exact" syncing by default, which means it will remove any packages that are not
|
||||
present in the lockfile.
|
||||
|
||||
To retain extraneous packages, use the `--inexact` option:
|
||||
To retain extraneous packages, use the `--inexact` flag:
|
||||
|
||||
```console
|
||||
$ uv sync --inexact
|
||||
```
|
||||
|
||||
In contrast, `uv run` uses "inexact" syncing by default, ensuring that all required packages are
|
||||
installed but not removing extraneous packages. To enable exact syncing with `uv run`, use the
|
||||
`--exact` flag:
|
||||
|
||||
```console
|
||||
$ uv run --exact ...
|
||||
```
|
||||
|
||||
### Syncing optional dependencies
|
||||
|
||||
uv reads optional dependencies from the `[project.optional-dependencies]` table. These are
|
||||
|
||||
Reference in New Issue
Block a user