-
Notifications
You must be signed in to change notification settings - Fork 359
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
RFC — Towards a new solver for libmamba
#3387
Comments
The general plan seems legit broadly speaking.
|
I should have mentioned that resolvo's public API exposes a Most of the design points are mostly based on the assumption that introducing bases classes is the right pathway and that the current other abstractions than Edit: For alternatives, I wonder whether template classes with a common template type parameter for the solver could help. |
The overall plan looks good, I have some minor concerns, partially because I don't know very well this part of mamba (so some of my concerns might be irrelevant or redundant):
|
|
Context
libsolv
has been used since the creation ofmamba
.While
libsolv
is a fundamental dependency oflibmamba
, its maintenance comes with challenges for mamba but also for conda-forge generally (for instance, see conda-forge/libsolv-feedstock#92 and conda-forge/openmpi-feedstock#153).Note
For more context, see those notes.
Proposed solution
mamba-org/resolvo
which, from a socio-technical perspective, seems to be the most relevant candidate.Based on a POC, which shows that resolvo have more or less the same performance as libsolv.
Proposed plan
Note
This plan gives the general direction but is not exhaustive. It might evolve overtime.
Architecture redesign: inheriting classes
Motivation:
Solver
andDataBase
are exposed to Python thanks topybind11
std::variant
butpybind11
does not work properly withstd::variant
unfortunatelypybind11
correctly handles inheritanceSchematically, currently we have:
Then we would have:
In this order:
mamba::solver::libsolv
tomamba::solver
, namely:solver::libsolv::parameters
tosolver::parameters
#3378solver::libsolv::UnSolvable
tosolver::UnSolvable
#3385solver::libsolv::RepoInfo
tosolver::RepoInfo
#3380for
libmambapy
, this will introduce new imports paths but the current python import paths must work but be deprecatedsolver::{Solver,DataBase}
base classessolver::DataBase
Database::add_repo_from_packages
#3382solver::libsolv::{Solver,DataBase}
classes accordinglylibmamba
's internals so that they usesolver::{Solver,DataBase}
(micro)mamba
's internals (especially the install codepath first)solver::resolvo::{Solver,DataBase}
classessolver::resolvo::DataBase
class (WIP injjerphan/mamba:alt-solver
branch)mamba::solver::Solution
solver::resolvo::Solver
classlibmambapy.bindings.solver.resolvo.{Solver,DataBase}
libmambapy.bindings.solver.{Solver,DataBase}
and expose an option to select "libsolv" or "resolvo"libmamba
andlibmambapy
public APIs, especially changes in UX and deprecated import pathsAlternative solver
decide
function; several different non-exclusive options exist:jjerphan/resolvo:mvsids
)The text was updated successfully, but these errors were encountered: