Skip to content

Commit

Permalink
Use StrictConcurrency=complete in Package.swift and add Swift 6 langu…
Browse files Browse the repository at this point in the history
…age mode CI (#44)

### Motivation

We're trying to lock in strict concurrency across the package ecosystem
and standardise on how that's tested.

### Modifications

- Add `StrictConcurrency=complete` feature flag to all targets in the
package manifest
- Remove now superfluous strict concurrency compiler flag in CI runs
- Add a new CI pipeline that tests the package with Swift 6 language
mode.

### Result

- Package configuration consistent with others adopting strict
concurrency.
- Swift 6 language mode pipeline established to catch regressions.
  • Loading branch information
simonjbeaumont authored Dec 20, 2024
1 parent cf4ffab commit fdd7e2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ jobs:
name: Unit tests
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -strict-concurrency=complete"
# TODO: `enable -Xswiftc -strict-concurrency=complete`
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable -Xswiftc -strict-concurrency=complete"
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"

cxx-interop:
name: Cxx interop
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main

swift-6-language-mode:
name: Cxx interop
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import PackageDescription
let swiftSettings: [SwiftSetting] = [
// https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md
// Require `any` for existential types.
.enableUpcomingFeature("ExistentialAny")
.enableUpcomingFeature("ExistentialAny"),
.enableExperimentalFeature("StrictConcurrency=complete"),
]

let package = Package(
Expand Down

0 comments on commit fdd7e2f

Please sign in to comment.