Enumerationswift-package-manager 6.0.1PackageGraph
Cause
Every incompatibility has a cause to explain its presence in the derivation graph. Only the root incompatibility uses .root
. All other incompatibilities are either obtained from dependency constraints, decided upon in decision making or derived during unit propagation or conflict resolution. Using this information we can build up a derivation graph by following the tree of causes. All leaf nodes are external dependencies and all internal nodes are derived incompatibilities.
indirect enum Cause
An example graph could look like this:
┌────────────────────────────┐ ┌────────────────────────────┐
│{foo ^1.0.0, not bar ^2.0.0}│ │{bar ^2.0.0, not baz ^3.0.0}│
└─────────────┬──────────────┘ └──────────────┬─────────────┘
│ ┌────────────────────────┘
▼ ▼
┌─────────────┴──────┴───────┐ ┌────────────────────────────┐
│{foo ^1.0.0, not baz ^3.0.0}│ │{root 1.0.0, not foo ^1.0.0}│
└─────────────┬──────────────┘ └──────────────┬─────────────┘
│ ┌───────────────────────────┘
▼ ▼
┌─────┴───┴──┐
│{root 1.0.0}│
└────────────┘
Cases
case root
The root incompatibility.
case dependency(node: DependencyResolutionNode)
The incompatibility represents a package’s dependency on another package.
case conflict(cause: ConflictCause)
The incompatibility was derived from two others during conflict resolution.
case noAvailableVersion
There exists no version to fulfill the specified requirement.
case versionBasedDependencyContainsUnversionedDependency(versionedDependency: PackageReference, unversionedDependency: PackageReference)
A version-based dependency contains unversioned-based dependency.
case incompatibleToolsVersion(ToolsVersion)
The package’s tools version is incompatible.
Other members in extension
Type members
init(OrderedCollections.OrderedSet<Term>, root: DependencyResolutionNode, cause: Cause
) throws init(Term..., root: DependencyResolutionNode, cause: Cause
) throws init(terms: OrderedCollections.OrderedSet<Term>, cause: Cause
)
Instance members
Citizens in PackageGraph
Conformances
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.
Types
Instance members
var isConflict: Bool
var isSingleLine: Bool
Returns whether this cause can be represented in a single line of the error output.
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.