Skip to content

Commit 568d9aa

Browse files
authored
Disable package customization of module ABI name (#1601)
This disables a portion of the changes introduced in #1471 which specified an alternate module ABI name when building this project as a Swift package. Resolves rdar://170069880 ### Motivation: These changes regressed our ability to build documentation for the package. In order to reintroduce the original fix in full, we'll need a way to customize the ABI name of a module for the purpose of building documentation. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent 0225560 commit 568d9aa

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Package.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,10 @@ extension Array where Element == PackageDescription.SwiftSetting {
465465
/// module related to Swift Testing loaded into a runner process avoids this
466466
/// issue.
467467
static func moduleABIName(_ targetName: String) -> Self {
468-
[.unsafeFlags(["-module-abi-name", "\(targetName)_package"])]
468+
// Workaround: Disable module ABI name customization, since it has regressed
469+
// building DocC documentation (see rdar://171555540).
470+
// [.unsafeFlags(["-module-abi-name", "\(targetName)_package"])]
471+
[]
469472
}
470473
}
471474

Sources/Testing/Running/Runner.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extension Runner {
8181
/// type at runtime, it may be better-suited for ``Configuration`` instead.
8282
private struct _Context: Sendable {
8383
/// A serializer used to reduce parallelism among test cases.
84-
var testCaseSerializer: Serializer?
84+
var testCaseSerializer: Serializer<Void>?
8585

8686
/// Which iteration of the test plan is being executed.
8787
var iteration: Int

Sources/Testing/Support/Serializer.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,13 @@ let defaultParallelizationWidth: Int = {
4646
/// items do not start running; they must wait until the suspended work item
4747
/// either returns or throws an error.
4848
///
49+
/// The generic type parameter `T` is unused. It avoids warnings when multiple
50+
/// copies of the testing library are loaded into a runner process on platforms
51+
/// which use the Objective-C runtime, due to non-generic actor types being
52+
/// implemented as classes there.
53+
///
4954
/// This type is not part of the public interface of the testing library.
50-
final actor Serializer {
55+
final actor Serializer<T> {
5156
/// The maximum number of work items that may run concurrently.
5257
nonisolated let maximumWidth: Int
5358

0 commit comments

Comments
 (0)