Skip to content

Commit 3b2346c

Browse files
authored
Merge pull request #371 from apple/fix/swift-pm-deprecated-methods
remove workspace delegate
2 parents cb17725 + c02bdf8 commit 3b2346c

File tree

1 file changed

+6
-25
lines changed

1 file changed

+6
-25
lines changed

Sources/SKSwiftPMWorkspace/SwiftPMWorkspace.swift

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,13 @@ public final class SwiftPMWorkspace {
9090
let workspaceConfiguration = try Workspace.Configuration(path: packageRoot.appending(components: ".swiftpm", "config"), fs: fileSystem)
9191

9292
self.workspace = Workspace(
93-
dataPath: buildPath,
94-
editablesPath: packageRoot.appending(component: "Packages"),
95-
pinsFile: packageRoot.appending(component: "Package.resolved"),
96-
manifestLoader: ManifestLoader(manifestResources: toolchain.manifestResources, cacheDir: buildPath),
97-
delegate: BuildSettingProviderWorkspaceDelegate(),
93+
dataPath: buildPath,
94+
editablesPath: packageRoot.appending(component: "Packages"),
95+
pinsFile: packageRoot.appending(component: "Package.resolved"),
96+
manifestLoader: ManifestLoader(manifestResources: toolchain.manifestResources, cacheDir: buildPath),
9897
config: workspaceConfiguration,
99-
fileSystem: fileSystem,
100-
skipUpdate: true)
98+
fileSystem: fileSystem,
99+
skipUpdate: true)
101100

102101
let triple = toolchain.triple
103102

@@ -446,24 +445,6 @@ private func findPackageDirectory(
446445
return path
447446
}
448447

449-
public final class BuildSettingProviderWorkspaceDelegate: WorkspaceDelegate {
450-
public func packageGraphWillLoad(
451-
currentGraph: PackageGraph,
452-
dependencies: AnySequence<ManagedDependency>,
453-
missingURLs: Set<String>)
454-
{}
455-
456-
public func fetchingWillBegin(repository: String) {}
457-
458-
public func fetchingDidFinish(repository: String, diagnostic: TSCBasic.Diagnostic?) {}
459-
460-
public func cloning(repository: String) {}
461-
462-
public func removing(repository: String) {}
463-
464-
public func managedDependenciesDidUpdate(_ dependencies: AnySequence<ManagedDependency>) {}
465-
}
466-
467448
extension TSCBasic.Diagnostic.Behavior {
468449
var asLogLevel: LogLevel {
469450
switch self {

0 commit comments

Comments
 (0)