Skip to content

Commit 8a6ed78

Browse files
authored
Enable upcoming feature 'InferIsolatedConformances' and fix issues it reveals (#1126)
This enables the `InferIsolatedConformances` upcoming Swift feature from [SE-0470: Global-actor isolated conformances](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0470-isolated-conformances.md) and fixes a couple of pre-existing issues it revealed. I confirmed these code changes still build successfully using a Swift 6.1 toolchain. ### 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 ae71313 commit 8a6ed78

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Package.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ extension Array where Element == PackageDescription.SwiftSetting {
288288
// new-enough toolchain.
289289
.enableExperimentalFeature("AllowUnsafeAttribute"),
290290

291+
.enableUpcomingFeature("InferIsolatedConformances"),
292+
291293
// When building as a package, the macro plugin always builds as an
292294
// executable rather than a library.
293295
.define("SWT_NO_LIBRARY_MACRO_PLUGINS"),

Sources/Testing/Running/Configuration.TestFilter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ extension Configuration.TestFilter.Kind {
514514

515515
/// A protocol representing a value which can be filtered using
516516
/// ``Configuration/TestFilter-swift.struct``.
517-
private protocol _FilterableItem {
517+
private protocol _FilterableItem: Sendable {
518518
/// The test this item represents.
519519
var test: Test { get }
520520

Tests/TestingMacrosTests/TestSupport/Parse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import SwiftSyntaxBuilder
1919
import SwiftSyntaxMacros
2020
import SwiftSyntaxMacroExpansion
2121

22-
fileprivate let allMacros: [String: any Macro.Type] = [
22+
fileprivate let allMacros: [String: any (Macro & Sendable).Type] = [
2323
"expect": ExpectMacro.self,
2424
"require": RequireMacro.self,
2525
"requireAmbiguous": AmbiguousRequireMacro.self, // different name needed only for unit testing

cmake/modules/shared/CompilerSettings.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ add_compile_options(
1717
add_compile_options(
1818
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-upcoming-feature -Xfrontend ExistentialAny>"
1919
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-upcoming-feature -Xfrontend InternalImportsByDefault>"
20-
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-upcoming-feature -Xfrontend MemberImportVisibility>")
20+
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-upcoming-feature -Xfrontend MemberImportVisibility>"
21+
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -enable-upcoming-feature -Xfrontend InferIsolatedConformances>")
2122

2223
# Platform-specific definitions.
2324
if(APPLE)

0 commit comments

Comments
 (0)