Skip to content

Commit 05ae424

Browse files
authored
Enable experimental 'AllowUnsafeAttribute' feature to continue supporting 6.1 development snapshot toolchains (#1084)
This fixes a build failure when attempting to build the `main` branch using a 6.1 development snapshot toolchain. This failure was introduced by #1069, which added usage of the new `@unsafe` attribute, and the failure was revealed when we set up the 6.1 CI jobs in #1083. Here are some relevant related Swift PRs which give context around these changes: - swiftlang/swift#75413 - swiftlang/swift#79645 See the code comment for more details. ### 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 3abbb2b commit 05ae424

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: Package.swift

+11
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,17 @@ extension Array where Element == PackageDescription.SwiftSetting {
277277
// proposal via Swift Evolution.
278278
.enableExperimentalFeature("SymbolLinkageMarkers"),
279279

280+
// This setting is no longer needed when building with a 6.2 or later
281+
// toolchain now that SE-0458 has been accepted and implemented, but it is
282+
// needed in order to preserve support for building with 6.1 development
283+
// snapshot toolchains. (Production 6.1 toolchains can build the testing
284+
// library even without this setting since this experimental feature is
285+
// _suppressible_.) This setting can be removed once the minimum supported
286+
// toolchain for building the testing library is ≥ 6.2. It is not needed
287+
// in the CMake settings since that is expected to build using a
288+
// new-enough toolchain.
289+
.enableExperimentalFeature("AllowUnsafeAttribute"),
290+
280291
// When building as a package, the macro plugin always builds as an
281292
// executable rather than a library.
282293
.define("SWT_NO_LIBRARY_MACRO_PLUGINS"),

0 commit comments

Comments
 (0)