🍒[5.9][Concurrency] Fix init task group with flags availability #67670
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description: The new runtime function
swift_taskGroup_initializeWithFlags
introduced to support discarding task group initialization has wrong availability. It must have availability equal to when it was introduced, but had the "general" concurrency one. Its availability must be 5.9. If we don't do this, then code like this:can crash when compiled against iOS 16 target, since it'd attempt to strong refer to the symbol, but it's missing, yielding a
Symbol not found: _swift_taskGroup_initializeWithFlags
Risk: Low, the method we're changing availability of cannot be called from user code, and is only called in IRGen generated code inside a method that is properly availability annotated already.
Reward: High, without the fix adopting discarding task groups is limited in apps which also need to support older versions of iOS which do not have this API, as the "usual"
if #available
guarding does not prevent the crash.Review by: @rjmccall @mikeash
Testing: CI testing
Original PR: #67669
Radar: rdar://112469076