Coder Social home page Coder Social logo

Comments (2)

Hind-M avatar Hind-M commented on September 27, 2024 1

The general plan seems legit broadly speaking.

  • Regarding the Database, we could use a base class as you suggested, or try and isolate the parts specific to libsolv in a specific class to use inside Database (because resolvo's API could be very different) but at least Database is already connected to the rest of mamba and hopefully we won't need to change much.
  • Instead of moving everything in mamba::solver::libsolv to mamba::solver, we may want to leave it as it is and try in the same way to isolate what's related to libsolv and what would be common with resolvo.
    Unsolvable for example seems to be tightly linked with libsolv internals so that would be a class specific to libsolv and we should maybe wrap it into another one alongside something else for resolvo (we may need to define its API first to know what to do, I don't know if that work has been done yet).
    So maybe just a renaming would be enough to make it clear it's libsolv specific, or actually keep the same names and just have two namespaces libsolv and resolvo
  • Same for repo_info
  • parameters seem general enough, but maybe some classes/structs are specific to libsolv (no equivalent in resolvo, semantically speaking)
  • Why detemplate Database::add_repo_from_packages? It seems ok to me

from mamba.

jjerphan avatar jjerphan commented on September 27, 2024

Regarding the Database, we could use a base class as you suggested, or try and isolate the parts specific to libsolv in a specific class to use inside Database (because resolvo's API could be very different) but at least Database is already connected to the rest of mamba and hopefully we won't need to change much.

I should have mentioned that resolvo's public API exposes a DependencyProvider (similar to a Database) and a Solver. Based on the initial POC, I am quite confident that we could have similar abstractions for resolvo.

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 Database and Solver can be decoupled from libsolv, but we need to validate that this is the right approach (I am pretty sure there are other designs which would avoid having a set of base classes and solver-specific sets of concrete classes).


Edit: For alternatives, I wonder whether template classes with a common template type parameter for the solver could help.

from mamba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.