Skip to content

🍒[5.9][Sema] Improve SerialExecutor diagnostics #67231

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

Merged
merged 3 commits into from
Jul 13, 2023

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Jul 11, 2023

Description: This PR tackles the case of SerialExecutor conformances with pre-SwiftStdlib 5.9 deployment targets. Previously, such a conformance would produce an unfixable warning about the enqueue(UnownedJob) requirement being deprecated — even though it's the only requirement that can be implemented without restricting the availability to SwiftStdlib 5.9. Fixing this involves two main changes:

The aforementioned warning will now be emitted iff the witness' nominal type has a sufficiently recent availability, under which the ExecutorJob requirement can be used.
There is now a new warning if both ExecutorJob and UnownedJob requirements are implemented in a pre-5.9 availability context, pointing out that the ExecutorJob overload will never be selected.

Risk: Low, only prevents a warning diagnostic
Review by: @DougGregor @hborla
Testing: CI testing, also verified freestanding configuration
Original PR: #66934
Radar: rdar://110329131

@ktoso ktoso requested a review from a team as a code owner July 11, 2023 21:18
@ktoso ktoso changed the title [Sema] Improve SerialExecutor diagnostics 🍒[5.9][Sema] Improve SerialExecutor diagnostics Jul 11, 2023
@ktoso
Copy link
Contributor Author

ktoso commented Jul 11, 2023

@swift-ci smoke test

@ktoso ktoso added concurrency Feature: umbrella label for concurrency language features 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Jul 12, 2023
@DougGregor
Copy link
Member

@swift-ci please test

@ktoso
Copy link
Contributor Author

ktoso commented Jul 13, 2023

Thx, @kabiroberai and Doug!

@ktoso ktoso merged commit bbce215 into swiftlang:release/5.9 Jul 13, 2023
@ktoso ktoso deleted the pick-serial-executor-warning branch July 13, 2023 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concurrency Feature: umbrella label for concurrency language features 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants