WorkspaceDelegate
The delegate interface used by the workspace to report status information.
Workspace+Delegation.swift:29protocol WorkspaceDelegate : AnyObject
Requirements
Instance members
func dependenciesUpToDate(
) The workspace has finished updating and all the dependencies are already up-to-date.
func didCheckOut(package: PackageIdentity, repository: String, revision: String, at: AbsolutePath, duration: DispatchTimeInterval
) The workspace has checked out a particular revision of a working directory. The error indicates whether the operation failed or succeeded.
func didCompileManifest(packageIdentity: PackageIdentity, packageLocation: String, duration: DispatchTimeInterval
) The workspace successfully compiled a package manifest, as reported by the assigned manifest loader. this happens for non-cached manifests
func didComputeVersion(package: PackageIdentity, location: String, version: String, duration: DispatchTimeInterval
) Called when the resolver finished computing the version for the repository.
func didCreateWorkingCopy(package: PackageIdentity, repository: String, at: AbsolutePath, duration: DispatchTimeInterval
) The workspace has cloned a repository from the local cache to a working directory. The error indicates whether the operation failed or succeeded.
func didDownloadAllBinaryArtifacts(
) The workspace finished downloading all binary artifacts.
func didDownloadBinaryArtifact(from: String, result: Result<(path: AbsolutePath, fromCache: Bool), Error>, duration: DispatchTimeInterval
) The workspace has finished downloading a binary artifact.
func didEvaluateManifest(packageIdentity: PackageIdentity, packageLocation: String, duration: DispatchTimeInterval
) The workspace successfully evaluated (executed) a compiled package manifest, as reported by the assigned manifest loader. this happens for non-cached manifests
func didFetchPackage(package: PackageIdentity, packageLocation: String?, result: Result<PackageFetchDetails, Error>, duration: DispatchTimeInterval
) The workspace has finished fetching this package.
func didLoadGraph(duration: DispatchTimeInterval
) The workspace has finished loading the graph to memory
func didLoadManifest(packageIdentity: PackageIdentity, packagePath: AbsolutePath, url: String, version: Version?, packageKind: PackageReference.Kind, manifest: Manifest?, diagnostics: [Diagnostic], duration: DispatchTimeInterval
) The workspace has loaded a package manifest, either successfully or not. The manifest is nil if an error occurs, in which case there will also be at least one error in the list of diagnostics (there may be warnings even if a manifest is loaded successfully).
func didResolveDependencies(duration: DispatchTimeInterval
) The workspace has finished resolving dependencies
func didUpdateDependencies(duration: DispatchTimeInterval
) The workspace has finished updating dependencies
func didUpdateRepository(package: PackageIdentity, repository: String, duration: DispatchTimeInterval
) The workspace has finished updating this repository.
func downloadingBinaryArtifact(from: String, bytesDownloaded: Int64, totalBytesToDownload: Int64?
) The workspace is downloading a binary artifact.
func fetchingPackage(package: PackageIdentity, packageLocation: String?, progress: Int64, total: Int64?
) Called every time the progress of the package fetch operation updates.
func onUnsignedRegistryPackage(registryURL: URL, package: PackageModel.PackageIdentity, version: TSCUtility.Version, completion: (Bool) -> Void
) func onUntrustedRegistryPackage(registryURL: URL, package: PackageModel.PackageIdentity, version: TSCUtility.Version, completion: (Bool) -> Void
) func removing(package: PackageIdentity, packageLocation: String?
) The workspace is removing this repository because it is no longer needed.
func resolvedFileChanged(
) Called when the Package.resolved file is changed outside of libSwiftPM operations.
func willCheckOut(package: PackageIdentity, repository: String, revision: String, at: AbsolutePath
) The workspace is about to check out a particular revision of a working directory.
func willCompileManifest(packageIdentity: PackageIdentity, packageLocation: String
) The workspace is about to compile a package manifest, as reported by the assigned manifest loader. this happens for non-cached manifests
func willComputeVersion(package: PackageIdentity, location: String
) Called when the resolver begins to be compute the version for the repository.
func willCreateWorkingCopy(package: PackageIdentity, repository: String, at: AbsolutePath
) The workspace is about to clone a repository from the local cache to a working directory.
func willDownloadBinaryArtifact(from: String, fromCache: Bool
) The workspace has started downloading a binary artifact.
func willEvaluateManifest(packageIdentity: PackageIdentity, packageLocation: String
) The workspace is about to evaluate (execute) a compiled package manifest, as reported by the assigned manifest loader. this happens for non-cached manifests
func willFetchPackage(package: PackageIdentity, packageLocation: String?, fetchDetails: PackageFetchDetails
) The workspace has started fetching this package.
func willLoadGraph(
) The workspace has started loading the graph to memory
func willLoadManifest(packageIdentity: PackageIdentity, packagePath: AbsolutePath, url: String, version: Version?, packageKind: PackageReference.Kind
) The workspace is about to load a package manifest (which might be in the cache, or might need to be parsed). Note that this does not include speculative loading of manifests that may occur during dependency resolution; rather, it includes only the final manifest loading that happens after a particular package version has been checked out into a working directory.
func willResolveDependencies(
) The workspace has started resolving dependencies
func willResolveDependencies(reason: WorkspaceResolveReason
) Called when the resolver is about to be run.
func willUpdateDependencies(
) The workspace has started updating dependencies
func willUpdateRepository(package: PackageIdentity, repository: String
) The workspace has started updating this repository.