Skip to content

Commit 3da0373

Browse files
Merge pull request #1775 from cachemeifyoucan/eng/PR-remove-caching-invalid-configuration
Remove error for invalid swift caching configuration
2 parents eba1952 + d091f6d commit 3da0373

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

Sources/SwiftDriver/ExplicitModuleBuilds/ExplicitDependencyBuildPlanner.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,6 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
264264
for dependencyModule in swiftDependencyArtifacts {
265265
inputs.append(TypedVirtualPath(file: dependencyModule.modulePath.path,
266266
type: .swiftModule))
267-
268-
let prebuiltHeaderDependencyPaths = dependencyModule.prebuiltHeaderDependencyPaths ?? []
269-
if cas != nil && !prebuiltHeaderDependencyPaths.isEmpty {
270-
throw DependencyScanningError.unsupportedConfigurationForCaching("module \(dependencyModule.moduleName) has bridging header dependency")
271-
}
272267
}
273268
for moduleArtifactInfo in clangDependencyArtifacts {
274269
let clangModulePath =

Sources/SwiftDriver/SwiftScan/SwiftScan.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public enum DependencyScanningError: LocalizedError, DiagnosticData, Equatable {
3939
case scanningLibraryInvocationMismatch(String, String)
4040
case scanningLibraryNotFound(AbsolutePath)
4141
case argumentQueryFailed
42-
case unsupportedConfigurationForCaching(String)
4342

4443
public var description: String {
4544
switch self {
@@ -65,8 +64,6 @@ public enum DependencyScanningError: LocalizedError, DiagnosticData, Equatable {
6564
return "Dependency Scanning library not found at path: \(path)"
6665
case .argumentQueryFailed:
6766
return "Supported compiler argument query failed"
68-
case .unsupportedConfigurationForCaching(let reason):
69-
return "Unsupported configuration for -cache-compile-job, consider turn off swift caching: \(reason)"
7067
}
7168
}
7269

Tests/SwiftDriverTests/CachingBuildTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -718,9 +718,9 @@ final class CachingBuildTests: XCTestCase {
718718
"-working-directory", path.nativePathString(escaped: true),
719719
main.nativePathString(escaped: true)] + sdkArgumentsForTesting,
720720
interModuleDependencyOracle: dependencyOracle)
721-
// This is currently not supported.
722-
XCTAssertThrowsError(try driver.planBuild()) {
723-
XCTAssertEqual($0 as? DependencyScanningError, .unsupportedConfigurationForCaching("module Foo has bridging header dependency"))
721+
let jobs = try driver.planBuild()
722+
for job in jobs {
723+
XCTAssertFalse(job.outputCacheKeys.isEmpty)
724724
}
725725
}
726726
}

0 commit comments

Comments
 (0)