-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic: Resolution should contain all packages #2763
Comments
This sounds very likely to be a regression related to #2596 Can you share more details on the requirements? Do you have a minimal reproduction? |
Or even a maximal reproduction :) |
One reproduction is if you have multiple versions of a package installed. Then, the resolver will try to use them, but the install plan will reject them all.
Yields:
|
In general, we probably need to try and reduce the coupling in the assumptions, hmm... |
I got the same error on my local machine when installing the following minimal requirements.txt file:
uv pip install -r requirements.txt
Resolved 47 packages in 330ms
thread 'main' panicked at crates\uv\src\commands\pip_install.rs:670:18:
Resolution should contain all packages
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |
@bschoenmaeckers are any of those packages already installed locally? |
@bschoenmaeckers I cannot reproduce this:
|
…tion in the resolver (#2779) Addresses panic introduced in #2596 and reported in #2763 (comment) When there are multiple versions of a package available, we remove the existing packages before installing the resolved version to "fix" the environment. We must remove all of the package versions and reinstall because removing _any_ of the package versions could break the others. Since reinstalls require a pull from the remote, this broke a contract between the resolver and the planner which must always agree on which packages should come from the remote. This further demonstrates that we should be constructing the install plan with more concrete knowledge from the resolver (i.e. `ResolvedDist` instead of `Requirement`) to avoid having to manually ensure logic matches. ## Test plan Fails on `main` with panic succeeds on branch ``` uv venv --seed source .venv/bin/activate pip install anyio==3.7.0 --ignore-installed pip install anyio==4.0.0 --ignore-installed cargo run -- pip install anyio black -v ```
I cannot reproduce this error anymore after creating a new venv. So it was maybe just a fluke. |
I'm going to close for now since we've fixed a few issues here. If you see it again in the latest release, please LMK and we'll re-open! |
We are using
uv
in Github Actions to install our dependencies. It has been running great for a few weeks now until this afternoon (after 0.1.27 released). Using https://github.com/marketplace/actions/setup-uv, we did not haveuv
locked to a specific version, and it was unable to install dependencies, giving the error.Running the command
uv pip install --system -r requirements.txt
produces the error:After a bit of research, I tried locking CI to version 0.1.26 and things worked fine.
Our CI runner OS is Ubuntu 22.04.4 LTS.
The text was updated successfully, but these errors were encountered: