Skip to content

Re-enable swiftinterface verification with compatibility headers #1203

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
merged 1 commit into from
Oct 12, 2022
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
7 changes: 0 additions & 7 deletions Sources/SwiftDriver/Jobs/Planning.swift
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,6 @@ extension Driver {
// Don't verify by default modules emitted from a merge-module job
// as it's more likely to be invalid.
emitModuleSeparately || compilerMode == .singleCompile ||
parsedOptions.hasFlag(positive: .verifyEmittedModuleInterface,
negative: .noVerifyEmittedModuleInterface,
default: false),

// Don't verify by default modules emitting a compatibility header. This is
// unsupported as the headers are merged after all archs are built. rdar://90864986
self.objcGeneratedHeaderPath == nil ||
parsedOptions.hasFlag(positive: .verifyEmittedModuleInterface,
negative: .noVerifyEmittedModuleInterface,
default: false)
Expand Down
4 changes: 2 additions & 2 deletions Tests/SwiftDriverTests/SwiftDriverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5262,14 +5262,14 @@ final class SwiftDriverTests: XCTestCase {
XCTAssertFalse(verifyJob.commandLine.contains(.flag("-check-api-availability-only")))
}

// Don't verify modules with compatibility headers.
// Do verify modules with compatibility headers.
do {
var driver = try Driver(args: ["swiftc", "foo.swift", "-emit-module", "-module-name",
"foo", "-emit-module-interface",
"-enable-library-evolution", "-emit-objc-header-path", "foo-Swift.h"],
env: envVars)
let plannedJobs = try driver.planBuild()
XCTAssertEqual(plannedJobs.filter( { job in job.kind == .verifyModuleInterface}).count, 0)
XCTAssertEqual(plannedJobs.filter( { job in job.kind == .verifyModuleInterface}).count, 1)
}
}

Expand Down