operator-framework / deppy

Deppy: The dependency resolver for Kubernetes
Apache License 2.0
14 stars 21 forks source link

Breaking change: remove `DeppySolver` wrapper and export internal solver #161

Closed m1kola closed 5 months ago

m1kola commented 6 months ago

When we merge #160 (issue #154) which removes variable sources the DeppySolver becomes not very useful: just a thin wrapper around the solver from the internal package.

I think we can get rid of DeppySolver as well as Solution struct.

I think this should become something like below and get exported:

// Solve takes a slice containing all Variables and returns a slice
// containing only those Variables that were selected for
// installation. If no solution is possible an error is returned.
func (s *solver) Solve(vars []deppy.Variable) ([]deppy.Variable, error) {
    // ...
}