@@ -1257,15 +1257,24 @@ final class ExplicitModuleBuildTests: XCTestCase {
1257
1257
let moduleBarPath = path. appending ( component: " Bar.swiftmodule " ) . nativePathString ( escaped: true )
1258
1258
try localFileSystem. writeFileContents ( srcBar, bytes: " public class KlassBar {} " )
1259
1259
1260
+ // Explicitly use an output file map to avoid an in-place job.
1261
+ let outputFileMap = path. appending ( component: " output-file-map.json " )
1262
+ try localFileSystem. writeFileContents ( outputFileMap, bytes: """
1263
+ {
1264
+ " " : {
1265
+ " swift-dependencies " : " Bar.swiftdeps "
1266
+ }
1267
+ }
1268
+ """ )
1269
+
1260
1270
let sdkArgumentsForTesting = ( try ? Driver . sdkArgumentsForTesting ( ) ) ?? [ ]
1261
1271
let ( stdLibPath, shimsPath, _, _) = try getDriverArtifactsForScanning ( )
1262
1272
1263
1273
var driver1 = try Driver ( args: [ " swiftc " ,
1264
1274
" -explicit-module-build " ,
1265
- " -module-name " ,
1266
- " Bar " ,
1267
- " -working-directory " ,
1268
- path. nativePathString ( escaped: true ) ,
1275
+ " -module-name " , " Bar " ,
1276
+ " -working-directory " , path. nativePathString ( escaped: true ) ,
1277
+ " -output-file-map " , outputFileMap. nativePathString ( escaped: false ) ,
1269
1278
" -emit-module " ,
1270
1279
" -emit-module-path " , moduleBarPath,
1271
1280
" -module-cache-path " , moduleCachePath. nativePathString ( escaped: true ) ,
@@ -1298,15 +1307,13 @@ final class ExplicitModuleBuildTests: XCTestCase {
1298
1307
var driver2 = try Driver ( args: [ " swiftc " ,
1299
1308
" -I " , path. nativePathString ( escaped: true ) ,
1300
1309
" -explicit-module-build " ,
1301
- " -module-name " ,
1302
- " Foo " ,
1303
- " -working-directory " ,
1304
- path. nativePathString ( escaped: true ) ,
1310
+ " -module-name " , " Foo " ,
1311
+ " -working-directory " , path. nativePathString ( escaped: true ) ,
1312
+ " -output-file-map " , outputFileMap. nativePathString ( escaped: false ) ,
1305
1313
" -emit-module " ,
1306
1314
" -emit-module-path " , moduleFooPath,
1307
1315
" -module-cache-path " , moduleCachePath. nativePathString ( escaped: true ) ,
1308
- " -module-alias " ,
1309
- " Car=Bar " ,
1316
+ " -module-alias " , " Car=Bar " ,
1310
1317
srcFoo. nativePathString ( escaped: true ) ,
1311
1318
" -I " , stdLibPath. nativePathString ( escaped: true ) ,
1312
1319
" -I " , shimsPath. nativePathString ( escaped: true ) ,
0 commit comments