Skip to content

Concurrency: Fix multiple condfails #74943

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

Closed
wants to merge 3 commits into from

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Jul 3, 2024

Resolves multiple issues with the textual interface of the _Concurrency module for supported older compilers:

  • Guard uses of a new built-in with #if $BuiltinCreateAsyncTaskOwnedTaskExecutor.
  • Restore -enable-experimental-feature IsolatedAny (older compilers don't enable it by default).
  • Remove @_allowFeatureSuppression(IsolatedAny) attributes. The suppressed alternatives for these methods did not build and additionally they were leaking the sending keyword into scopes that were not protected by $SendingArgsAndResults.

ktoso and others added 3 commits July 3, 2024 10:20
While the new parameter is added in a compatible way where code which
does not refer to it will get a defaulted nil value; since we refer to a
new parameter name in source, we need to guard it with a language
feature -- as old compilers will not have this new name available.

This should prevent a potential condfail issue.
Supported older compilers don't enable this feature by default, so it can't be
omitted from the `_Concurrency` module's flags (regression from
swiftlang#74543).

Additionally, remove `@_allowFeatureSuppression(IsolatedAny)` from all
declarations. We no longer need to support compilers that don't have the
`IsolatedAny` feature, so the suppression is superfluous and the alternative
branches didn't actually build anyways. _Additionally_, the suppressible
feature logic could not handle suppressing `IsolatedAny` simultaneously with
`SendingArgsAndResults`, resulting in a broken interface because `sending` was
used outside `#if $SendingArgsAndResults` guards.
@tshortli tshortli requested a review from ktoso as a code owner July 3, 2024 17:26
@tshortli tshortli requested review from rjmccall and DougGregor July 3, 2024 17:30
@tshortli
Copy link
Contributor Author

tshortli commented Jul 3, 2024

@swift-ci please smoke test

@tshortli
Copy link
Contributor Author

tshortli commented Jul 3, 2024

It turns out I can modify Konrad's original PR, so using that: #74929

@tshortli tshortli closed this Jul 3, 2024
@tshortli tshortli deleted the concurrency-condfails branch July 3, 2024 17:39
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.

2 participants