Module Zeroinstall_solver.Make

Select a compatible set of components to run a program. See Zeroinstall.Solver for the instantiation of this functor on the actual 0install types.

Parameters

Signature

module Output : S.SOLVER_RESULT with module Input = Input
val do_solve : closest_match:bool -> Input.requirements -> Output.t option

do_solve model req finds an implementation matching the given requirements, plus any other implementations needed to satisfy its dependencies.

parameter closest_match

adds a lowest-ranked (but valid) implementation (Input.dummy_impl) to every interface, so we can always select something. Useful for diagnostics. You should ensure that Input.get_command always returns a dummy command for dummy_impl too. Note: always try without closest_match first, or it may miss a valid solution.

returns

None if the solve fails (only happens if closest_match is false).