PackageReference
A package reference.
struct PackageReference
This represents a reference to a package containing its identity and location.
A package reference.
struct PackageReference
This represents a reference to a package containing its identity and location.
import PackageModel
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
init(identity: PackageIdentity, kind: Kind, name: String? = nil)
Create a package reference given its identity and kind.
static func fileSystem(identity: PackageIdentity, path: AbsolutePath) -> PackageReference
static func localSourceControl(identity: PackageIdentity, path: AbsolutePath) -> PackageReference
static func registry(identity: PackageIdentity) -> PackageReference
static func remoteSourceControl(identity: PackageIdentity, url: SourceControlURL) -> PackageReference
static func root(identity: PackageIdentity, path: AbsolutePath) -> PackageReference
var canonicalLocation: CanonicalPackageLocation { get }
var deprecatedName: String { get }
The name of the package, if available.
var description: String { get }
var diagnosticsMetadata: ObservabilityMetadata { get }
let identity: PackageIdentity
The identity of the package.
let kind: Kind
The kind of package: root, local, or remote.
var locationString: String { get }
The location of the package.
static func == (lhs: PackageReference, rhs: PackageReference) -> Bool
func equalsIncludingLocation(_ other: PackageReference) -> Bool
func hash(into hasher: inout Hasher)
func withName(_ newName: String) -> PackageReference
Create a new package reference object with the given name.
enum Kind
The kind of package reference.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.