Skip to content

Add the OPAMSOLVERTOLERANCE environment variable to allow users to fix solver timeouts for good#5510

Merged
rjbou merged 1 commit intoocaml:masterfrom
kit-ty-kate:solver-tolerance
Feb 5, 2025
Merged

Add the OPAMSOLVERTOLERANCE environment variable to allow users to fix solver timeouts for good#5510
rjbou merged 1 commit intoocaml:masterfrom
kit-ty-kate:solver-tolerance

Conversation

@kit-ty-kate
Copy link
Copy Markdown
Member

@kit-ty-kate kit-ty-kate commented Apr 14, 2023

Partially fixes #5504
Partially fixes #3447
Partially fixes #5353
Partially fixes #4794
Fixes #3230
Requires ocaml-opam/ocaml-mccs#40

Optimizing solvers can be an annoying breed, sometimes a problem is just too complex for solver A but easy for solver B, and on some other problem solver B might take too long where solver A takes no time at all.

To partly solve the numerous timeout issues that have been plagued opam, I introduce this new environment variable that allows builtin-mccs+glpk (default solver) to not wait around for too long when it found a solution but the solution is not the optimum solution.

The downside of having unoptimized solutions is that opam might install out-of-date packages so it is to be used parsimoniously.

TODO: add tests too complicated to do reliably

@kit-ty-kate kit-ty-kate added the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Apr 17, 2023
@rjbou rjbou removed the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Apr 27, 2023
@rjbou rjbou force-pushed the solver-tolerance branch from 348ffe5 to 44443c9 Compare July 6, 2023 13:57
@rjbou
Copy link
Copy Markdown
Collaborator

rjbou commented Feb 5, 2025

🙌

@rjbou rjbou merged commit 30d4706 into ocaml:master Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants