-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Concurrency][SE-review update] Task names update #80984
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
Conversation
@swift-ci please smoke test |
@swift-ci please test |
@swift-ci please test source compatibility |
Windows too hm
|
@swift-ci please smoke test |
@swift-ci please test source compatibility |
@swift-ci please test source compatibility |
@swift-ci please smoke test |
UPDATE: We decided to change the always-emit-into-client APIs, rather than keep adding exponentially more overloads. -- Well, this turned out quite more complex:
That's, 50 declarations in total, and I just noticed we didn't do startSynchronously + detached, so that's 2 more. |
7c7607b
to
16119e5
Compare
Implemented, only pending a slight availability change to be done in: swiftlang/swift#80984
ca9ba77
to
32e1b67
Compare
@swift-ci please smoke test |
Blocked on @kubamracek's idea to fix the embedded build. |
#81107 is now merged. I think you should be able to drop the SIA_ARCH changes. |
Great, thank you! |
32e1b67
to
009af88
Compare
@swift-ci please smoke test |
@swift-ci please test |
@swift-ci please smoke test macOS |
Cannot reproduce the linux failure on Linux either... very confused what's going on here - need to keep digging. A fresh linux build works fine, so I'm not sure why CI would report compile errors :\ |
@swift-ci please smoke test |
@swift-ci please smoke test |
@swift-ci please smoke test |
@swift-ci please smoke test |
…EIC funcs [Concurrency] Lower availability for task names + addTask WIP on changing the always emit into client funcs
…utor [Concurrency] Adjust tests for renamed initializer [Embedded][Concurrency] Workaround for Gyb+concurrency module+embedded Add Task+init gyb to embedded; Remove TaskGroup+Embedded.swift workaround [Concurrency] Undo build workaround
@swift-ci please smoke test |
@swift-ci please test source compatibility |
@swift-ci please smoke test |
@swift-ci please test source compatibility |
**Description**: This adds "task name" parameter to all task creating functions. This is done in a few ways, e.g. we can backdeploy this to 5.1 in APIs which do not accept the `TaskExecutor` but it they do we provide a version for 6.0+ etc. This was requested in the SE acceptable of this proposal [Acceptance post SE-0469](https://forums.swift.org/t/accepted-with-modifications-se-0469-task-naming/79438). This moves all these declarations to gyb since going through them one by one has become unmaintainable otherwise. **Scope/Impact**: All task creation APIs now gain a new task name parameter. **Risk:** Medium, changes existing APIs rather than adding "even more overloads" though this risk was discussed in the team and accepted. This has a potential to be source breaking it someone used Task.init and friends as function. **Testing**: CI testing, source compatibility suite testing **Reviewed by**: **Original PR:** - #81107 build changes required for this - #80984 **Radar:** --------- Co-authored-by: Kuba Mracek <[email protected]>
This lowers the availability of the new
name:
Task initializers to "as low as possible" as requested by the SE review acceptance.Specifically, if a method gets the
TaskExecutor
the lowest availability we can do is 6.0. Otherwise we try 5.1. Discarding task group forces us to be 5.9.While doing this, we move all these methods, as well as legacy APIs, into gyb generation. So we save significant repetition and finally have one place to edit documentation for the many overloads.
This also CHANGES the always-emit-into-client functions, instead of the alternative of 50 overloads we'd have to do otherwise. So we're keeping the number of overloads managable, at the risk of a rare source break if someone used Task.init as function -- this was discussed and considered an acceptable risk.