File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -444,8 +444,19 @@ public final class ManifestLoader: ManifestLoaderProtocol {
444
444
// Pass the fd in arguments.
445
445
cmd += [ " -fileno " , " \( file. fileHandle. fileDescriptor) " ]
446
446
447
+ // Prefer swiftinterface if both swiftmodule and swiftinterface files are present.
448
+ //
449
+ // This will avoid failures during incremental builds when the
450
+ // slate swiftmodule file is still present from the previous
451
+ // install. We should be able to remove this after some
452
+ // transition period.
453
+ var env = ProcessEnv . vars
454
+ #if os(macOS)
455
+ env [ " SWIFT_FORCE_MODULE_LOADING " ] = " prefer-parseable "
456
+ #endif
457
+
447
458
// Run the command.
448
- let result = try Process . popen ( arguments: cmd)
459
+ let result = try Process . popen ( arguments: cmd, environment : env )
449
460
let output = try ( result. utf8Output ( ) + result. utf8stderrOutput ( ) ) . spm_chuzzle ( )
450
461
manifestParseResult. compilerOutput = output
451
462
You can’t perform that action at this time.
0 commit comments