File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -320,7 +320,10 @@ public struct Driver {
320
320
diagnosticsEngine: DiagnosticsEngine = DiagnosticsEngine ( handlers: [ Driver . stderrDiagnosticsHandler] ) ,
321
321
fileSystem: FileSystem = localFileSystem,
322
322
executor: DriverExecutor ,
323
+ // FIXME: Duplication with externalBuildArtifacts and externalTargetModulePathMap
324
+ // is a temporary backwards-compatibility shim to help transition SwiftPM to the new API
323
325
externalBuildArtifacts: ExternalBuildArtifacts ? = nil ,
326
+ externalTargetModulePathMap: ExternalTargetModulePathMap ? = nil ,
324
327
interModuleDependencyOracle: InterModuleDependencyOracle ? = nil
325
328
) throws {
326
329
self . env = env
@@ -329,7 +332,11 @@ public struct Driver {
329
332
self . diagnosticEngine = diagnosticsEngine
330
333
self . executor = executor
331
334
332
- self . externalBuildArtifacts = externalBuildArtifacts
335
+ if let externalArtifacts = externalBuildArtifacts {
336
+ self . externalBuildArtifacts = externalArtifacts
337
+ } else if let externalTargetPaths = externalTargetModulePathMap {
338
+ self . externalBuildArtifacts = ( externalTargetPaths, [ : ] )
339
+ }
333
340
334
341
if case . subcommand = try Self . invocationRunMode ( forArgs: args) . mode {
335
342
throw Error . subcommandPassedToDriver
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ import Foundation
15
15
16
16
/// A map from a module identifier to a path to its .swiftmodule file.
17
17
public typealias ExternalTargetModulePathMap = [ ModuleDependencyId : AbsolutePath ]
18
+
19
+ // FIXME: ExternalBuildArtifacts is a temporary backwards-compatibility shim
20
+ // to help transition SwiftPM to the new API.
18
21
/// A tuple all external artifacts a build system may pass in as input to the explicit build of the current module
19
22
/// Consists of a map of externally-built targets, and a map of all previously discovered/scanned modules.
20
23
public typealias ExternalBuildArtifacts = ( ExternalTargetModulePathMap , ModuleInfoMap )
You can’t perform that action at this time.
0 commit comments