Skip to content

Commit 4eae794

Browse files
committed
Remove deprecated externalBuildArtifacts API.
Its usage was removed in the SwiftPM Client a while back.
1 parent c947d59 commit 4eae794

File tree

2 files changed

+5
-21
lines changed

2 files changed

+5
-21
lines changed

Sources/SwiftDriver/Driver/Driver.swift

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,10 @@ public struct Driver {
343343
/// expand response files, etc. By default this is the local filesystem.
344344
/// - Parameter executor: Used by the driver to execute jobs. The default argument
345345
/// is present to streamline testing, it shouldn't be used in production.
346-
/// - Parameter externalBuildArtifacts: All external artifacts a build system may pass in as input to the explicit
347-
/// build of the current module. Consists of a map of externally-built targets, and a map of all previously
348-
/// discovered/scanned modules.
346+
/// - Parameter externalTargetModulePathMap: All external artifacts a build system may pass in as input to the explicit
347+
/// build of the current module. Consists of a map of externally-built targets, and their corresponding binary modules.
348+
/// - Parameter interModuleDependencyOracle: A dependency oracle instance, re-used in multiple-target builds
349+
/// to make use of caching of common dependency scanning queries
349350
public init(
350351
args: [String],
351352
env: [String: String] = ProcessEnv.vars,
@@ -354,9 +355,6 @@ public struct Driver {
354355
executor: DriverExecutor,
355356
integratedDriver: Bool = true,
356357
compilerExecutableDir: AbsolutePath? = nil,
357-
// FIXME: Duplication with externalBuildArtifacts and externalTargetModulePathMap
358-
// is a temporary backwards-compatibility shim to help transition SwiftPM to the new API
359-
externalBuildArtifacts: ExternalBuildArtifacts? = nil,
360358
externalTargetModulePathMap: ExternalTargetModulePathMap? = nil,
361359
interModuleDependencyOracle: InterModuleDependencyOracle? = nil
362360
) throws {
@@ -367,12 +365,6 @@ public struct Driver {
367365
self.diagnosticEngine = diagnosticsEngine
368366
self.executor = executor
369367

370-
if let externalArtifacts = externalBuildArtifacts {
371-
self.externalBuildArtifacts = externalArtifacts
372-
} else if let externalTargetPaths = externalTargetModulePathMap {
373-
self.externalBuildArtifacts = (externalTargetPaths, [:])
374-
}
375-
376368
if case .subcommand = try Self.invocationRunMode(forArgs: args).mode {
377369
throw Error.subcommandPassedToDriver
378370
}
@@ -463,14 +455,6 @@ public struct Driver {
463455
self.interModuleDependencyOracle = dependencyOracle
464456
} else {
465457
self.interModuleDependencyOracle = InterModuleDependencyOracle()
466-
467-
// This is a shim for backwards-compatibility with ModuleInfoMap-based API
468-
// used by SwiftPM
469-
if let externalArtifacts = externalBuildArtifacts {
470-
if !externalArtifacts.1.isEmpty {
471-
try self.interModuleDependencyOracle.mergeModules(from: externalArtifacts.1)
472-
}
473-
}
474458
}
475459

476460
self.fileListThreshold = try Self.computeFileListThreshold(&self.parsedOptions, diagnosticsEngine: diagnosticsEngine)

Tests/SwiftDriverTests/ExplicitModuleBuildTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
246246
"test.swift", "-module-name", "A", "-g"]
247247

248248
var driver = try Driver(args: commandLine, executor: executor,
249-
externalBuildArtifacts: (targetModulePathMap, [:]),
249+
externalTargetModulePathMap: targetModulePathMap,
250250
interModuleDependencyOracle: dependencyOracle)
251251
let scanLibPath = try Driver.getScanLibPath(of: driver.toolchain,
252252
hostTriple: driver.hostTriple,

0 commit comments

Comments
 (0)