Skip to content

[6.1]Remove error for invalid swift caching configuration #1776

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
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,6 @@ public typealias ExternalTargetModuleDetailsMap = [ModuleDependencyId: ExternalT
for dependencyModule in swiftDependencyArtifacts {
inputs.append(TypedVirtualPath(file: dependencyModule.modulePath.path,
type: .swiftModule))

let prebuiltHeaderDependencyPaths = dependencyModule.prebuiltHeaderDependencyPaths ?? []
if cas != nil && !prebuiltHeaderDependencyPaths.isEmpty {
throw DependencyScanningError.unsupportedConfigurationForCaching("module \(dependencyModule.moduleName) has bridging header dependency")
}
}
for moduleArtifactInfo in clangDependencyArtifacts {
let clangModulePath =
Expand Down
3 changes: 0 additions & 3 deletions Sources/SwiftDriver/SwiftScan/SwiftScan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public enum DependencyScanningError: LocalizedError, DiagnosticData, Equatable {
case scanningLibraryInvocationMismatch(String, String)
case scanningLibraryNotFound(AbsolutePath)
case argumentQueryFailed
case unsupportedConfigurationForCaching(String)

public var description: String {
switch self {
Expand All @@ -61,8 +60,6 @@ public enum DependencyScanningError: LocalizedError, DiagnosticData, Equatable {
return "Dependency Scanning library not found at path: \(path)"
case .argumentQueryFailed:
return "Supported compiler argument query failed"
case .unsupportedConfigurationForCaching(let reason):
return "Unsupported configuration for -cache-compile-job, consider turn off swift caching: \(reason)"
}
}

Expand Down
6 changes: 3 additions & 3 deletions Tests/SwiftDriverTests/CachingBuildTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,9 @@ final class CachingBuildTests: XCTestCase {
main.nativePathString(escaped: true)] + sdkArgumentsForTesting,
env: ProcessEnv.vars,
interModuleDependencyOracle: dependencyOracle)
// This is currently not supported.
XCTAssertThrowsError(try driver.planBuild()) {
XCTAssertEqual($0 as? DependencyScanningError, .unsupportedConfigurationForCaching("module Foo has bridging header dependency"))
let jobs = try driver.planBuild()
for job in jobs {
XCTAssertFalse(job.outputCacheKeys.isEmpty)
}
}
}
Expand Down