-
Notifications
You must be signed in to change notification settings - Fork 365
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
Add pre-processing to coinstallability checks #5024
Conversation
Test case:
from 5+ minutes on master to 12s here |
You can start reviewing, but hold on a little more before merging, I found a bug. Shouldn't be anything big. |
Fixed! |
Squeezed in a one-line fix for #4135 |
@@ -230,6 +230,47 @@ rankers.1.0.0 | |||
rankers.2.0.1 | |||
rankers.2.0.7 | |||
### opam list --depends-on lacaml -s --all-versions --coinstallable-with phylogenetics.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coinstallability with a non-existent version used to return nothing. Now it returns what would be compatible with that version, which seems more useful
@@ -261,11 +302,6 @@ Done. | |||
gpr.1.5.0 | |||
phylogenetics.0.0.0 | |||
### opam list --depends-on lacaml -s --all-versions --coinstallable-with lbfgs.0.8.8 gpr phylogenetics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coinstallable
now implies installable
(like in 2.0). The intersection was empty, so empty results here.
@Armael and myself hit performances issues in We warmly welcome progress on this :-) |
FWIW, in marracheck we run |
@Armael what is your switch invariant in your use-case? |
I have |
note from dev meeting: installable is not directly impacted by this PR (coinstallable is) . Better merge and see how it's going for this one. |
Indeed, this reimplements So it's normal that you don't get a speedup yet; as a benchmark you could try |
Fix list test on 32bit archs Fix 'list' test for Windows
Addresses some remaining costly cases in ocaml#4311 The patch includes a small reorganisation of `OpamSolver`, but the general idea is to fix the performance regression compared to 2.0: - with the introduction of solver invariants, the pre-processing that trimmed packages conflicting with the base in `OpamState` was removed - it was replaced by something much more general (and reliable) at the `OpamCudf` level - but only for calls to the external solver, until now NOTE: this enforces the invariant even for `opam install --coinstallable-with`, which is consistent with 2.0 but had changed in 2.1. Without it we can't really expect reasonable performance in general anyway.
Just run `opam list --installable` without further argument. Not adding a test because it would be too big in time and space.
Add pre-processing to coinstallability checks
Add pre-processing to coinstallability checks
Addresses some remaining costly cases in #4311
The patch includes a small reorganisation of
OpamSolver
, but the generalidea is to fix the performance regression compared to 2.0:
packages conflicting with the base in
OpamState
was removedOpamCudf
levelNOTE: this enforces the invariant even for
opam install --coinstallable-with
, which is consistent with 2.0 but had changed in 2.1.Without it we can't really expect reasonable performance in general anyway.