Skip to content

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Jun 4, 2024

PoC of adding typed throws to just Task.init and Task.detached -- we can't do it yet with TaskGroup but it would be perhaps worth doing so where we can, i.e. task initializers.

A bit confused about the ABI of .value -- I'm expecting that to need a new ABI entry point but that does not seem to be the case? Adding the typed throw to the accessor does not seem to change the mangling -- see second commit: adding an abi compat function just ends up in duplicate symbols as well -- is this a bug in typed throws mangling?

rdar://129195968

SE proposal: swiftlang/swift-evolution#2990

@ktoso ktoso requested a review from DougGregor June 4, 2024 01:02
@ktoso ktoso changed the title [Concurrency] Typed throws in Task.init and .detached [PoC][Concurrency] Typed throws in Task.init and .detached Jun 4, 2024
@ktoso
Copy link
Contributor Author

ktoso commented Jun 4, 2024

@swift-ci please smoke test

}

// ==== Typed throws Task.init overloads ---------------------------------------

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we decide we want to do this, I'd see if i can DRY this up in any way.

@ktoso ktoso added concurrency Feature: umbrella label for concurrency language features swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review and removed swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal labels Jun 4, 2024
@ktoso
Copy link
Contributor Author

ktoso commented Jun 5, 2024

  • TODO: Fix ABI for the computed property - done

@ktoso ktoso requested a review from a team as a code owner June 5, 2024 12:33
@ktoso ktoso requested review from hborla and slavapestov June 5, 2024 12:33
@ktoso ktoso force-pushed the wip-taskinit-typed-throws branch from 605843a to f7d93ff Compare June 5, 2024 12:52
@ktoso
Copy link
Contributor Author

ktoso commented Jun 5, 2024

@swift-ci please smoke test

@ktoso ktoso force-pushed the wip-taskinit-typed-throws branch from f7d93ff to ef7bb79 Compare June 5, 2024 13:00
@ktoso
Copy link
Contributor Author

ktoso commented Jun 5, 2024

@swift-ci please smoke test

@ktoso ktoso marked this pull request as draft June 6, 2024 03:44
@ktoso
Copy link
Contributor Author

ktoso commented Oct 10, 2025

Replaced by #84802 thanks to gyb-generating initializers now

@ktoso ktoso closed this Oct 10, 2025
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 swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant