Skip to content

Ensure #if $MoveOnly feature guard evaluates to true. #64560

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 2 commits into from
Mar 24, 2023

Conversation

kavon
Copy link
Member

@kavon kavon commented Mar 23, 2023

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.

There's a separate sort of oddity where hasFeature(Feature::Something) still evaluates to false, where Something is an always-on feature. That will be addressed in a separate PR here: #64602

resolves rdar://107050387

@kavon
Copy link
Member Author

kavon commented Mar 23, 2023

@swift-ci please smoke test

@kavon kavon force-pushed the revive-noncopyable-job branch from d6ac073 to 7f641f3 Compare March 23, 2023 22:52
@kavon
Copy link
Member Author

kavon commented Mar 23, 2023

@swift-ci please smoke test

@kavon kavon force-pushed the revive-noncopyable-job branch from 7f641f3 to 536ce51 Compare March 24, 2023 05:50
@kavon kavon changed the title Revert "[Workaround][Concurrency] Mark Job as NOT moveonly until we f… Ensure #if $MoveOnly feature guard evaluates to true. Mar 24, 2023
@kavon kavon marked this pull request as ready for review March 24, 2023 05:56
@kavon
Copy link
Member Author

kavon commented Mar 24, 2023

@swift-ci please test

@kavon kavon requested a review from ktoso March 24, 2023 05:56
Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

LGTM, man that was a silly issue :O

Thank you for investigating @kavon! I'll also run locally, I seemed to have a good chance to reproduce the issue before.

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
@kavon kavon force-pushed the revive-noncopyable-job branch 2 times, most recently from 0f37c53 to 86f6941 Compare March 24, 2023 15:56
This reverts commit abe377c.

Co-authored-by: Konrad `ktoso` Malawski <konrad_malawski@apple.com>
@kavon kavon force-pushed the revive-noncopyable-job branch from 86f6941 to 363448a Compare March 24, 2023 15:59
@kavon
Copy link
Member Author

kavon commented Mar 24, 2023

@swift-ci please smoke test and merge

@ktoso
Copy link
Contributor

ktoso commented Mar 28, 2023

This was missing a 5.9 cherry pick; #64666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants