Skip to content

Commit 0e6a400

Browse files
committed
[Workspace] Remove some unused delegates
<rdar://problem/47008823> Remove some unused delegates from Workspace object
1 parent d5a1ece commit 0e6a400

File tree

3 files changed

+0
-33
lines changed

3 files changed

+0
-33
lines changed

Sources/Commands/SwiftTool.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,6 @@ private class ToolWorkspaceDelegate: WorkspaceDelegate {
9090
self.stdoutStream = stdoutStream as? ThreadSafeOutputByteStream ?? ThreadSafeOutputByteStream(stdoutStream)
9191
}
9292

93-
func packageGraphWillLoad(
94-
currentGraph: PackageGraph,
95-
dependencies: AnySequence<ManagedDependency>,
96-
missingURLs: Set<String>
97-
) {
98-
}
99-
10093
func fetchingWillBegin(repository: String) {
10194
stdoutStream <<< "Fetching \(repository)"
10295
stdoutStream <<< "\n"
@@ -145,9 +138,6 @@ private class ToolWorkspaceDelegate: WorkspaceDelegate {
145138
stdoutStream <<< "\n"
146139
stdoutStream.flush()
147140
}
148-
149-
func managedDependenciesDidUpdate(_ dependencies: AnySequence<ManagedDependency>) {
150-
}
151141
}
152142

153143
protocol ToolName {

Sources/TestSupport/TestWorkspace.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -499,13 +499,9 @@ public struct TestPackage {
499499
public final class TestWorkspaceDelegate: WorkspaceDelegate {
500500

501501
public var events = [String]()
502-
public var managedDependenciesData = [AnySequence<ManagedDependency>]()
503502

504503
public init() {}
505504

506-
public func packageGraphWillLoad(currentGraph: PackageGraph, dependencies: AnySequence<ManagedDependency>, missingURLs: Set<String>) {
507-
}
508-
509505
public func repositoryWillUpdate(_ repository: String) {
510506
events.append("updating repo: \(repository)")
511507
}
@@ -537,8 +533,4 @@ public final class TestWorkspaceDelegate: WorkspaceDelegate {
537533
public func willResolveDependencies() {
538534
events.append("will resolve dependencies")
539535
}
540-
541-
public func managedDependenciesDidUpdate(_ dependencies: AnySequence<ManagedDependency>) {
542-
managedDependenciesData.append(dependencies)
543-
}
544536
}

Sources/Workspace/Workspace.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@ import Utility
1919
/// The delegate interface used by the workspace to report status information.
2020
public protocol WorkspaceDelegate: class {
2121

22-
// FIXME: This is defunct.
23-
//
24-
/// The workspace is about to load the complete package graph.
25-
///
26-
/// This delegate will only be called if we actually need to fetch and resolve dependencies.
27-
///
28-
/// - Parameters:
29-
/// - currentGraph: The current package graph. This is most likely a partial package graph.
30-
/// - dependencies: The current managed dependencies in the workspace.
31-
/// - missingURLs: The top-level missing packages we need to fetch. This will never be empty.
32-
func packageGraphWillLoad(currentGraph: PackageGraph, dependencies: AnySequence<ManagedDependency>, missingURLs: Set<String>)
33-
3422
/// The workspace has started fetching this repository.
3523
func fetchingWillBegin(repository: String)
3624

@@ -55,9 +43,6 @@ public protocol WorkspaceDelegate: class {
5543
/// The workspace is removing this repository because it is no longer needed.
5644
func removing(repository: String)
5745

58-
/// Called when the managed dependencies are updated.
59-
func managedDependenciesDidUpdate(_ dependencies: AnySequence<ManagedDependency>)
60-
6146
/// Called when the resolver is about to be run.
6247
func willResolveDependencies()
6348
}

0 commit comments

Comments
 (0)