Source
Represents the source of the artifact.
enum Source
Represents the source of the artifact.
enum Source
import Workspace
struct ManagedArtifact
A downloaded artifact managed by the workspace.
class Workspace
A workspace represents the state of a working project directory.
case remote(url: String, checksum: String)
Represents a remote artifact, with the url it was downloaded from, its checksum, and its path relative to the workspace artifacts path.
case local(checksum: String? = nil)
Represents a locally available artifact, with its path relative either to its package or to the workspace artifacts path, in the latter case, the checksum of the local archive the artifact was extracted from is set.
init(packageRef: PackageReference, targetName: String, source: Source, path: AbsolutePath, kind: BinaryModule.Kind)
static func local(packageRef: PackageReference, targetName: String, path: AbsolutePath, kind: BinaryModule.Kind, checksum: String? = nil) -> ManagedArtifact
Create an artifact present locally on the filesystem.
static func remote(packageRef: PackageReference, targetName: String, url: String, checksum: String, path: AbsolutePath, kind: BinaryModule.Kind) -> ManagedArtifact
Create an artifact downloaded from a remote url.
var description: String { get }
let kind: BinaryModule.Kind
let packageRef: PackageReference
The package reference.
let path: AbsolutePath
The path of the artifact on disk
let source: Source
The source of the artifact (local or remote).
let targetName: String
The name of the binary target the artifact corresponds to.
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
var description: String { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.