Skip to content

🍒[5.9][Concurrency] ensure #if $MoveOnly evaluates to true and bring back moveonly Job #64666

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

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Mar 28, 2023

Description: There was a subtle issue with feature flags after I enabled move-only types by default. Turns out that the $MoveOnly feature guard wasn't always evaluating to true when the -enable-experimental-move-only isn't provided. This change now ensures that's the case so that public noncopyable types compiled in different modules are picked up correctly.

This would break any use of moveonly types in the stdlib, including the first user of it: the Job API. This PR resolves this issue.

Risk: Low, the feature was missing a flag and this corrects the behavior
Review by: @jckarter @DougGregor @kavon
Testing: CI testing; and have manually verified this resolved the issue that moveonly types did not work in certain builds.
Original PR: #64560
Radar: rdar://107050387

kavon and others added 2 commits March 28, 2023 16:37
I enabled move-only types by default, but I didn't
realize that the `Feature::MoveOnly` needs to graduate
into a `LANGUAGE_FEATURE` so that `EvaluateIfConfigCondition`
will recognize `$MoveOnly` as being true.

fixes rdar://107050387
This reverts commit abe377c.

Co-authored-by: Konrad `ktoso` Malawski <konrad_malawski@apple.com>
@ktoso ktoso requested review from jckarter and kavon March 28, 2023 07:39
@ktoso ktoso requested a review from a team as a code owner March 28, 2023 07:39
@ktoso
Copy link
Contributor Author

ktoso commented Mar 28, 2023

@swift-ci please test

@ktoso ktoso changed the title bring back the noncopyable Job type in the _Concurrency lib 🍒[5.9][Concurrency] bring back the noncopyable Job type in the _Concurrency lib Mar 28, 2023
@ktoso ktoso changed the title 🍒[5.9][Concurrency] bring back the noncopyable Job type in the _Concurrency lib 🍒[5.9][Concurrency] ensure #if $MoveOnly evaluates to true and bring back moveonly Job Mar 28, 2023
@ktoso ktoso added concurrency Feature: umbrella label for concurrency language features 🍒 release cherry pick Flag: Release branch cherry picks labels Mar 28, 2023
@DougGregor DougGregor merged commit a6d2299 into swiftlang:release/5.9 Mar 28, 2023
@ktoso ktoso deleted the pick-bring-back-noncopyable-job branch March 28, 2023 22:28
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants