pub enum Kind<P: Package, VS: VersionSet, M: Eq + Clone + Debug + Display> {
NotRoot(Id<P>, VS::V),
NoVersions(Id<P>, VS),
FromDependencyOf(Id<P>, VS, Id<P>, VS),
DerivedFrom(IncompId<P, VS, M>, IncompId<P, VS, M>),
Custom(Id<P>, VS, M),
}Expand description
The reason for the incompatibility.
Variants§
NotRoot(Id<P>, VS::V)
Initial incompatibility aiming at picking the root package for the first decision.
This incompatibility drives the resolution, it requires that we pick the (virtual) root packages.
NoVersions(Id<P>, VS)
There are no versions in the given range for this package.
This incompatibility is used when we tried all versions in a range and no version worked, so we have to backtrack
FromDependencyOf(Id<P>, VS, Id<P>, VS)
Incompatibility coming from the dependencies of a given package.
If a@1 depends on b>=1,<2, we create an incompatibility with terms {a 1, b <1,>=2} with
kind FromDependencyOf(a, 1, b, >=1,<2).
We can merge multiple dependents with the same version. For example, if a@1 depends on b and a@2 depends on b, we can say instead a@1||2 depends on b.
DerivedFrom(IncompId<P, VS, M>, IncompId<P, VS, M>)
Derived from two causes. Stores cause ids.
For example, if a -> b and b -> c, we can derive a -> c.
Custom(Id<P>, VS, M)
The package is unavailable for reasons outside pubgrub.
Examples:
- The version would require building the package, but builds are disabled.
- The package is not available in the cache, but internet access has been disabled.