Skip to content

[6.2][Caching] Fix a fallout from block list remap #1872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ extension Driver {
if isFrontendArgSupported(.blockListFile) {
try findBlocklists().forEach {
commandLine.appendFlag(.blockListFile)
try addPathArgument(VirtualPath.absolute($0), to: &commandLine)
try addPathArgument(VirtualPath.absolute($0), to: &commandLine, remap: jobNeedPathRemap)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
---
key: value
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
---
key: value
6 changes: 4 additions & 2 deletions Tests/SwiftDriverTests/CachingBuildTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,7 @@ final class CachingBuildTests: XCTestCase {
var driver = try Driver(args: ["swiftc",
"-I", cHeadersPath.nativePathString(escaped: true),
"-I", swiftModuleInterfacesPath.nativePathString(escaped: true),
"/tmp/Foo.o", "-g",
"-explicit-module-build",
"-g", "-explicit-module-build",
"-cache-compile-job", "-cas-path", casPath.nativePathString(escaped: true),
"-working-directory", path.nativePathString(escaped: true),
"-disable-clang-target", "-scanner-prefix-map-sdk", "/^sdk",
Expand Down Expand Up @@ -940,6 +939,9 @@ final class CachingBuildTests: XCTestCase {
$0.starts(with: try testInputsPath.description)
})
}

try driver.run(jobs: jobs)
XCTAssertFalse(driver.diagnosticEngine.hasErrors)
}
}

Expand Down