Skip to content

Commit 1e09b6c

Browse files
Merge pull request #1872 from cachemeifyoucan/eng/PR-block-list-remap-fallout-6.2
[6.2][Caching] Fix a fallout from block list remap
2 parents b468b41 + e57811f commit 1e09b6c

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ extension Driver {
356356
if isFrontendArgSupported(.blockListFile) {
357357
try findBlocklists().forEach {
358358
commandLine.appendFlag(.blockListFile)
359-
try addPathArgument(VirtualPath.absolute($0), to: &commandLine)
359+
try addPathArgument(VirtualPath.absolute($0), to: &commandLine, remap: jobNeedPathRemap)
360360
}
361361
}
362362

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
---
2+
key: value
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
---
2+
key: value

Tests/SwiftDriverTests/CachingBuildTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,7 @@ final class CachingBuildTests: XCTestCase {
901901
var driver = try Driver(args: ["swiftc",
902902
"-I", cHeadersPath.nativePathString(escaped: true),
903903
"-I", swiftModuleInterfacesPath.nativePathString(escaped: true),
904-
"/tmp/Foo.o", "-g",
905-
"-explicit-module-build",
904+
"-g", "-explicit-module-build",
906905
"-cache-compile-job", "-cas-path", casPath.nativePathString(escaped: true),
907906
"-working-directory", path.nativePathString(escaped: true),
908907
"-disable-clang-target", "-scanner-prefix-map-sdk", "/^sdk",
@@ -944,6 +943,9 @@ final class CachingBuildTests: XCTestCase {
944943
XCTAssertFalse(command.contains { $0 == "-plugin-path" || $0 == "-external-plugin-path" ||
945944
$0 == "-load-plugin-library" || $0 == "-load-plugin-executable" })
946945
}
946+
947+
try driver.run(jobs: jobs)
948+
XCTAssertFalse(driver.diagnosticEngine.hasErrors)
947949
}
948950
}
949951

0 commit comments

Comments
 (0)