Module Diagnostics.Component
Information about a single role in the example (failed) selections produced by the solver.
type t
type rejection_reason
=[
|
`Model_rejection of Result.Input.rejection
Rejected before getting to solver.
|
`FailsRestriction of Result.Input.restriction
e.g. version too old for another component.
|
`DepFailsRestriction of Result.Input.dependency * Result.Input.restriction
Couldn't satisfy its dependencies.
|
`MachineGroupConflict of Result.Role.t * Result.Input.impl
A selected impl has a different machine type.
|
`ClassConflict of Result.Role.t * Result.Input.conflict_class
A selected impl has the same conflict class.
|
`ConflictsRole of Result.Role.t
A selected role conflicts with this (e.g. replaced-by).
|
`MissingCommand of Result.Input.command_name
Doesn't have a command we need.
|
`DiagnosticsFailure of string
Unknown failure reason (gives raw error from SAT solver).
]
Why a particular implementation was rejected. This could be because the input rejected it before it got to the solver, or because it conflicts with something else in the example (partial) solution.
type reject
= Result.Input.impl * rejection_reason
val pp_reject : Stdlib.Format.formatter -> reject -> unit
val selected_impl : t -> Result.Input.impl option
selected_impl t
is the implementation selected to fillt
's role, orNone
if no implementation was suitable.
val rejects : t -> reject list * [ `All_unusable | `No_candidates | `Conflicts ]
rejects t
returns the rejected candidates (call this ifselected_impl t = None
).`No_candidates
means that there were no implementations given at all (e.g. bad role name).`All_unusable
means every candidate was rejected before reaching the solver (e.g. they were all binaries for some other platform).`Conflicts
is the normal case, where some made it to the solver, but were rejected because they conflicted with other selections.
val pp : verbose:bool -> Stdlib.Format.formatter -> t -> unit
pp ~verbose
formats a message showing the status of this component, including all of its notes and, if there was no selected impl, the rejects.- parameter verbose
If
false
, limit the list of rejected candidates (if any) to five entries.