-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct condition to downweigh track-feature packages (#545)
We use track features to de-prioritize packages. Sometimes, the solver is forced to select a given package, e.g. when selecting `numpy-XY-<hash>` it might have a dependency on `pypy`. Numpy variants themselves are not down-prioritized, though. If we detect that a package forces only dependencies that have track features (such as the case for the numpy variant that only works together with `pypy`) we also "inherit" the down-weighing to `numpy` (otherwise the solver would be forced to use pypy later on). We already had the code for this but it was missing a `!` – this PR corrects that.
- Loading branch information
Showing
6 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
crates/rattler_solve/tests/snapshots/backends__libsolv_c__solve_python_numpy.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
source: crates/rattler_solve/tests/backends.rs | ||
expression: "solve_real_world::<rattler_solve::libsolv_c::Solver>(vec![\"numpy==1.23.2\",\n \"scipy==1.8.1\", \"python=3.9.*\"])" | ||
--- | ||
- _libgcc_mutex 0.1 conda_forge | ||
- _openmp_mutex 4.5 2_gnu | ||
- bzip2 1.0.8 h7f98852_4 | ||
- ca-certificates 2022.6.15 ha878542_0 | ||
- ld_impl_linux-64 2.36.1 hea4e1c9_2 | ||
- libblas 3.9.0 16_linux64_openblas | ||
- libcblas 3.9.0 16_linux64_openblas | ||
- libffi 3.4.2 h7f98852_5 | ||
- libgcc-ng 12.1.0 h8d9b700_16 | ||
- libgfortran-ng 12.1.0 h69a702a_16 | ||
- libgfortran5 12.1.0 hdcd56e2_16 | ||
- libgomp 12.1.0 h8d9b700_16 | ||
- liblapack 3.9.0 16_linux64_openblas | ||
- libnsl 2.0.0 h7f98852_0 | ||
- libopenblas 0.3.21 pthreads_h78a6416_1 | ||
- libsqlite 3.39.2 h753d276_1 | ||
- libstdcxx-ng 12.1.0 ha89aaad_16 | ||
- libuuid 2.32.1 h7f98852_1000 | ||
- libzlib 1.2.12 h166bdaf_2 | ||
- ncurses 6.3 h27087fc_1 | ||
- numpy 1.23.2 py39hba7629e_0 | ||
- openssl 3.0.5 h166bdaf_1 | ||
- python 3.9.13 h2660328_0_cpython | ||
- python_abi 3.9 2_cp39 | ||
- readline 8.1.2 h0f457ee_0 | ||
- scipy 1.8.1 py39h8ba3f38_2 | ||
- sqlite 3.39.2 h4ff8645_1 | ||
- tk 8.6.12 h27826a3_0 | ||
- tzdata 2021e he74cb21_0 | ||
- xz 5.2.6 h166bdaf_0 | ||
|
35 changes: 35 additions & 0 deletions
35
crates/rattler_solve/tests/snapshots/backends__resolvo__solve_python_numpy.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
source: crates/rattler_solve/tests/backends.rs | ||
expression: "solve_real_world::<rattler_solve::resolvo::Solver>(vec![\"numpy==1.23.2\",\n \"scipy==1.8.1\", \"python=3.9.*\"])" | ||
--- | ||
- _libgcc_mutex 0.1 conda_forge | ||
- _openmp_mutex 4.5 2_gnu | ||
- bzip2 1.0.8 h7f98852_4 | ||
- ca-certificates 2022.6.15 ha878542_0 | ||
- ld_impl_linux-64 2.36.1 hea4e1c9_2 | ||
- libblas 3.9.0 16_linux64_openblas | ||
- libcblas 3.9.0 16_linux64_openblas | ||
- libffi 3.4.2 h7f98852_5 | ||
- libgcc-ng 12.1.0 h8d9b700_16 | ||
- libgfortran-ng 12.1.0 h69a702a_16 | ||
- libgfortran5 12.1.0 hdcd56e2_16 | ||
- libgomp 12.1.0 h8d9b700_16 | ||
- liblapack 3.9.0 16_linux64_openblas | ||
- libnsl 2.0.0 h7f98852_0 | ||
- libopenblas 0.3.21 pthreads_h78a6416_1 | ||
- libsqlite 3.39.2 h753d276_1 | ||
- libstdcxx-ng 12.1.0 ha89aaad_16 | ||
- libuuid 2.32.1 h7f98852_1000 | ||
- libzlib 1.2.12 h166bdaf_2 | ||
- ncurses 6.3 h27087fc_1 | ||
- numpy 1.23.2 py39hba7629e_0 | ||
- openssl 3.0.5 h166bdaf_1 | ||
- python 3.9.13 h2660328_0_cpython | ||
- python_abi 3.9 2_cp39 | ||
- readline 8.1.2 h0f457ee_0 | ||
- scipy 1.8.1 py39h8ba3f38_2 | ||
- sqlite 3.39.2 h4ff8645_1 | ||
- tk 8.6.12 h27826a3_0 | ||
- tzdata 2021e he74cb21_0 | ||
- xz 5.2.6 h166bdaf_0 | ||
|
Git LFS file not shown