package 0install-solver

  1. Overview
  2. Docs

Information about a single role in the example (failed) selections produced by the solver.

type t
type rejection_reason = [
  1. | `Model_rejection of Result.Input.rejection
    (*

    Rejected before getting to solver.

    *)
  2. | `FailsRestriction of Result.Input.restriction
    (*

    e.g. version too old for another component.

    *)
  3. | `DepFailsRestriction of Result.Input.dependency * Result.Input.restriction
    (*

    Couldn't satisfy its dependencies.

    *)
  4. | `MachineGroupConflict of Result.Role.t * Result.Input.impl
    (*

    A selected impl has a different machine type.

    *)
  5. | `ClassConflict of Result.Role.t * Result.Input.conflict_class
    (*

    A selected impl has the same conflict class.

    *)
  6. | `ConflictsRole of Result.Role.t
    (*

    A selected role conflicts with this (e.g. replaced-by).

    *)
  7. | `MissingCommand of Result.Input.command_name
    (*

    Doesn't have a command we need.

    *)
  8. | `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.

val pp_reject : Format.formatter -> reject -> unit
val selected_impl : t -> Result.Input.impl option

selected_impl t is the implementation selected to fill t's role, or None if no implementation was suitable.

val notes : t -> Note.t list

Information discovered about this component.

val rejects : t -> reject list * [ `All_unusable | `No_candidates | `Conflicts ]

rejects t returns the rejected candidates (call this if selected_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 -> 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.

OCaml

Innovation. Community. Security.