Skip to content

uv sync --no-build-isolation doesn't remove extra dependencies #6580

@karimknaebel

Description

@karimknaebel

Whenever uv sync is called with --no-build-isolation, any extra packages that shouldn't be there aren't automatically removed.

➜ uv --version
uv 0.3.3 (Homebrew 2024-08-23)

➜ uv add flask
Using Python 3.12.5
Creating virtualenv at: .venv
Resolved 9 packages in 2ms
   Built bug @ file:///private/tmp/bug
Prepared 8 packages in 144ms
Installed 8 packages in 3ms
 + blinker==1.8.2
 + bug==0.1.0 (from file:///private/tmp/bug)
 + click==8.1.7
 + flask==3.0.3
 + itsdangerous==2.2.0
 + jinja2==3.1.4
 + markupsafe==2.1.5
 + werkzeug==3.0.4

➜ uv add --optional build setuptools
Resolved 10 packages in 69ms
   Built bug @ file:///private/tmp/bug
Prepared 2 packages in 145ms
Uninstalled 1 package in 0.34ms
Installed 2 packages in 16ms
 ~ bug==0.1.0 (from file:///private/tmp/bug)
 + setuptools==73.0.1

➜ uv sync --no-build-isolation
Resolved 10 packages in 2ms
Audited 8 packages in 0.04ms

➜ uv sync
Resolved 10 packages in 0.50ms
Uninstalled 1 package in 26ms
 - setuptools==73.0.1
 
 ➜ uv pip install ruff
Resolved 1 package in 2ms
Installed 1 package in 1ms
 + ruff==0.6.2

➜ uv sync --no-build-isolation
Resolved 10 packages in 0.66ms
Audited 8 packages in 0.05ms

➜ uv sync
Resolved 10 packages in 0.63ms
Uninstalled 1 package in 0.65ms
 - ruff==0.6.2

Metadata

Metadata

Assignees

Labels

questionAsking for clarification or support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions