Skip to content
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

CI: concurrency=complete require-explicit-sendable #76

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

rnro
Copy link
Contributor

@rnro rnro commented Oct 15, 2024

Motivation:

Adopt -Xswiftc -strict-concurrency=complete -Xswiftc -require-explicit-sendable in CI to lock-in concurrency-safety wins.

Modifications:

Added strict flags to pull request and scheduled GHA CI on Swift 6.0. Add StrictConcurrency to Package.swift.

Result:

CI should ensure we don't regress data-race safety on Swift 6.0.

@rnro rnro requested a review from FranzBusch October 15, 2024 12:34
@rnro rnro added the semver/none No version bump required. label Oct 15, 2024
@@ -17,7 +17,8 @@ import PackageDescription
import class Foundation.ProcessInfo

let upcomingFeatureSwiftSettings: [SwiftSetting] = [
.enableUpcomingFeature("ExistentialAny")
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("StrictConcurrency"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't want this unilaterally: either only in CI, or only in the Swift 6 compiler.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nevermind, for ASN.1 it's totally fine as it doesn't have any concurrency anyway.

Comment on lines 19 to 21
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -strict-concurrency=complete -Xswiftc -require-explicit-sendable"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -strict-concurrency=complete -Xswiftc -require-explicit-sendable"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -strict-concurrency=complete -Xswiftc -require-explicit-sendable"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are enabling strict concurrency in the Package.swift already so we don't have to pass it here as well.

Comment on lines 15 to 17
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -strict-concurrency=complete -Xswiftc -require-explicit-sendable"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -strict-concurrency=complete -Xswiftc -require-explicit-sendable"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -strict-concurrency=complete -Xswiftc -require-explicit-sendable"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@rnro rnro requested a review from FranzBusch October 16, 2024 09:36
Motivation:

Adopt `-Xswiftc -strict-concurrency=complete -Xswiftc
-require-explicit-sendable` in CI to lock-in concurrency-safety wins.

Modifications:

Added strict flags to pull request and scheduled GHA CI on Swift 6.0.

Result:

CI should ensure we don't regress data-race safety on Swift 6.0.
@rnro rnro merged commit 81ee7dc into apple:main Oct 17, 2024
26 checks passed
@rnro rnro deleted the adopt_strict_concurrency branch October 17, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants