uv
uv copied to clipboard
`uv sync` and `uv pip install -e .` do different things when virtual packages are in the workspace
uv sync omits them, while uv pip install -e . installs them as non-editable. This seems bad. At the very least, I'd say that uv pip install -e . should install them as editable.
\cc @zanieb for input on the correct behavior
Can you share a bit more details on what a reproduction looks like?
If you uv init foo then cd foo and uv init bar, and add bar as a dependency:
[project]
name = "foo"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = ["bar"]
[tool.uv.workspace]
members = ["bar"]
[tool.uv.sources]
bar = { workspace = true }
Then uv sync:
❯ uv sync
Using Python 3.12.1
Creating virtualenv at: .venv
Resolved 2 packages in 0.81ms
Audited in 0.00ms
Versus uv pip install -e .:
❯ uv pip install -e .
Resolved 2 packages in 2ms
Installed 2 packages in 1ms
+ bar==0.1.0 (from file:///Users/crmarsh/workspace/puffin/foo/bar)
+ foo==0.1.0 (from file:///Users/crmarsh/workspace/puffin/foo)
same problem here