mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-17 02:52:45 +00:00
We regularly get confusing bug reports where a package sometimes works and sometimes doesn't and it's not clear to the user why. Ultimately, it turns out that two packages contain the same module and there is a race condition when installing the two packages. Usually, it's one of the opencv-python distributions, but recently it's been z3, too. These error are completely inscrutable to users. * https://github.com/astral-sh/uv/issues/10708 * https://github.com/astral-sh/uv/issues/11806 * https://github.com/astral-sh/uv/issues/11659 * https://github.com/astral-sh/uv/issues/13435 * https://github.com/astral-sh/uv/issues/13550 * https://github.com/astral-sh/uv/issues/14030 We now warn for top-level modules (pattern: `<identifier>/__init__.py`) that collide in a single installation, naming the offending wheels. Checking for `__init__.py` excludes namespace packages. Test script: ``` uv venv -q && cargo run -q --profile fast-build pip install --no-progress --link-mode clone opencv-python opencv-contrib-python --no-build --no-deps uv venv -q && cargo run -q --profile fast-build pip install --no-progress --link-mode copy opencv-python opencv-contrib-python --no-build --no-deps uv venv -q && cargo run -q --profile fast-build pip install --no-progress --link-mode hardlink opencv-python opencv-contrib-python --no-build --no-deps uv venv -q && cargo run -q --profile fast-build pip install --no-progress --link-mode symlink opencv-python opencv-contrib-python --no-build --no-deps ``` We currently only catch conflicts in a single installation. Should we prime the lock database with the site-packages contents, and would that carry overhead? |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||