Skip to content

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

Merged
rnro merged 2 commits intoapple:mainfrom
rnro:adopt_strict_concurrency
Oct 17, 2024
Merged

CI: concurrency=complete require-explicit-sendable#76
rnro merged 2 commits intoapple:mainfrom
rnro:adopt_strict_concurrency

Conversation

@rnro
Copy link
Copy Markdown
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
@rnro rnro force-pushed the adopt_strict_concurrency branch from a754d2e to 726c54c Compare October 15, 2024 12:57
Comment thread Package.swift
let upcomingFeatureSwiftSettings: [SwiftSetting] = [
.enableUpcomingFeature("ExistentialAny")
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("StrictConcurrency"),
Copy link
Copy Markdown
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
Copy Markdown
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 thread .github/workflows/pull_request.yml Outdated
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
Copy Markdown
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 thread .github/workflows/scheduled.yml Outdated
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
Copy Markdown
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 force-pushed the adopt_strict_concurrency branch from a70a865 to 7202800 Compare October 16, 2024 09:37
@rnro rnro force-pushed the adopt_strict_concurrency branch from 7202800 to 489a0fe Compare October 16, 2024 10:31
@rnro rnro merged commit 81ee7dc into apple:main Oct 17, 2024
@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