Module 1-Result.Input
include S.CORE_MODEL
module Role : sig ... endtype commandA
commandis 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).
type command_name= private stringAn 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.
type dep_info={dep_role : Role.t;dep_importance : [ `Essential | `Recommended | `Restricts ];dep_required_commands : command_name list;}type requirements={role : Role.t;command : command_name option;}
val requires : Role.t -> impl -> dependency list * command_name listGet 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_onlydependencies 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.
val dep_info : dependency -> dep_infoval command_requires : Role.t -> command -> dependency list * command_name listAs
requires, but for commands.
val get_command : impl -> command_name -> command option
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.
type machine_group= private stringThe 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").
val pp_impl : Stdlib.Format.formatter -> impl -> unitval pp_command : Stdlib.Format.formatter -> command -> unitval implementations : Role.t -> role_informationThe list of candidates to fill a role.
val restrictions : dependency -> restriction listRestrictions on how the role is filled
val meets_restriction : impl -> restriction -> boolval machine_group : impl -> machine_group option
val conflict_class : impl -> conflict_class list
The following are used for diagnostics only
type rejectionThe 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.
val rejects : Role.t -> (impl * rejection) list * string listGet 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.
val pp_version : Stdlib.Format.formatter -> impl -> unitval user_restrictions : Role.t -> restriction optionGet any user-specified restrictions affecting a role. These are used to filter out implementations before they get to the solver.
val pp_impl_long : Stdlib.Format.formatter -> impl -> unitA detailed identifier for the implementation. In 0install, this is the version number and part of the hash.
val format_machine : impl -> stringval string_of_restriction : restriction -> stringval describe_problem : impl -> rejection -> stringval dummy_impl : implA dummy implementation, used to get diagnostic information if the solve fails. It satisfies all requirements, even conflicting ones.