ManifestLoader
Utility class for loading manifest files.
ManifestLoader.swift:279final class ManifestLoader
This class is responsible for reading the manifest data and produce a properly formed PackageModel.Manifest
object. It currently does so by interpreting the manifest source using Swift – that produces a JSON serialized form of the manifest (as implemented by PackageDescription
’s atexit()
handler) which is then deserialized and loaded.
Citizens in PackageLoading
Conformances
protocol ManifestLoaderProtocol
Protocol for the manifest loader interface.
Typealiases
Type members
init(toolchain: UserToolchain, serializedDiagnostics: Bool, isManifestSandboxEnabled: Bool, useInMemoryCache: Bool, cacheDir: AbsolutePath?, extraManifestFlags: [String]?, importRestrictions: (startingToolsVersion: ToolsVersion, allowedImports: [String])?, delegate: Delegate?
) static func findManifest(packagePath: AbsolutePath, fileSystem: FileSystem, currentToolsVersion: ToolsVersion
) throws -> AbsolutePath Returns the manifest at the given package path.
Instance members
var delegate: Delegate?
func interpreterFlags(for: ToolsVersion
) -> [String] Returns the interpreter flags for a manifest.
func load(manifestPath: AbsolutePath, manifestToolsVersion: ToolsVersion, packageIdentity: PackageIdentity, packageKind: PackageReference.Kind, packageLocation: String, packageVersion: (version: Version?, revision: String?)?, identityResolver: IdentityResolver, dependencyMapper: DependencyMapper, fileSystem: FileSystem, observabilityScope: ObservabilityScope, delegateQueue: DispatchQueue, callbackQueue: DispatchQueue
) async throws -> Manifest func load(manifestPath: AbsolutePath, manifestToolsVersion: ToolsVersion, packageIdentity: PackageIdentity, packageKind: PackageReference.Kind, packageLocation: String, packageVersion: (version: Version?, revision: String?)?, identityResolver: IdentityResolver, dependencyMapper: DependencyMapper, fileSystem: FileSystem, observabilityScope: ObservabilityScope, delegateQueue: DispatchQueue, callbackQueue: DispatchQueue, completion: @escaping (Result<Manifest, Error>) -> Void
) func purgeCache(observabilityScope: ObservabilityScope
) reset internal state and purge shared cache
func resetCache(observabilityScope: ObservabilityScope
) reset internal cache
Instance features
func load(packagePath: AbsolutePath, packageIdentity: PackageIdentity, packageKind: PackageReference.Kind, packageLocation: String, packageVersion: (version: Version?, revision: String?)?, currentToolsVersion: ToolsVersion, identityResolver: IdentityResolver, dependencyMapper: DependencyMapper, fileSystem: FileSystem, observabilityScope: ObservabilityScope, delegateQueue: DispatchQueue, callbackQueue: DispatchQueue
) async throws -> Manifest func load(packagePath: AbsolutePath, packageIdentity: PackageIdentity, packageKind: PackageReference.Kind, packageLocation: String, packageVersion: (version: Version?, revision: String?)?, currentToolsVersion: ToolsVersion, identityResolver: IdentityResolver, dependencyMapper: DependencyMapper, fileSystem: FileSystem, observabilityScope: ObservabilityScope, delegateQueue: DispatchQueue, callbackQueue: DispatchQueue, completion: @escaping (Result<Manifest, Error>) -> Void
)