Page
Library
Module
Module type
Parameter
Class
Class type
Source
Model.MakeSourceinclude Zeroinstall_solver.S.SOLVER_INPUTinclude Zeroinstall_solver.S.CORE_MODELAn impl is something that can fill a Role.t (e.g. a particular version of a package).
A command is an entry-point provided by an implementation. Using a command may require extra dependencies (for example, a "test" command might depend on a test runner).
An identifier for a command within a role. Note: It might not be necessary to use any commands - we could instead treat the command name as an optional part of the role, and treat each command as a separate impl instead.
A dependency indicates that an impl or command requires another role to be filled.
type dep_info = {dep_role : Role.t;dep_importance : [ `Essential | `Recommended | `Restricts ];dep_required_commands : command_name list;}Get an implementation's dependencies.
The dependencies should be ordered with the most important first. The solver will prefer to select the best possible version of an earlier dependency, even if that means selecting a worse version of a later one (restricts_only dependencies are ignored for this).
An implementation or command can also bind to itself. e.g. "test" command that requires its own "run" command. We also return all such required commands.
As requires, but for commands.
type role_information = {replacement : Role.t option;Another role that conflicts with this one.
*)impls : impl list;Candidates to fill the role.
*)}Information provided to the solver about a role.
A restriction limits which implementations can fill a role.
The solver will avoid selections with mixed machine groups. This is useful if e.g. the CPU supports 32-bit and 64-bit programs, but we can't mix them in a single process. The string simply has to be unique for each group (e.g. "32" and "64").
The list of candidates to fill a role.
Restrictions on how the role is filled
There can be only one implementation in each conflict class.
The reason why the model rejected an implementation before it got to the solver. For example, the implementation was a Windows binary but the host is Linux.
Get the candidates which were rejected for a role (and not passed to the solver), as well as any general notes and warnings not tied to a particular impl.
Get any user-specified restrictions affecting a role. These are used to filter out implementations before they get to the solver.
A detailed identifier for the implementation. In 0install, this is the version number and part of the hash.
version impl is the Opam package for impl, if any. Virtual and dummy implementations return None.
virtual_role impls is a virtual package name with candidates impls. This is used if the user requests multiple packages on the command line (the single impl will also be virtual).
virtual_impl ~context ~depends is a virtual package which just depends on depends. This is used if the user requests multiple packages on the command line - each requested package becomes a dependency of the virtual implementation.