Skip to content

Conversation

stmontgomery
Copy link
Contributor

This replaces usage of rethrows with typed throws in the internal-only Graph support type.

Motivation:

It's now recommended to use typed throws in generic code that never produces its own errors, but only passes through errors that come from callers. And adopting typed throws in more places will reduce barriers to eventually supporting Embedded Swift.

Modifications:

  • Replace all usage of rethrows with the analogous typed throws declaration in Graph.

Result:

No behavioral/runtime change.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.
@stmontgomery stmontgomery added enhancement New feature or request embedded-swift 📟 Embedded Swift issues labels Sep 4, 2024
@stmontgomery stmontgomery self-assigned this Sep 4, 2024
@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@grynspan
Copy link
Contributor

grynspan commented Sep 5, 2024

Let's double-check that this is back-deployable to older Apple OSes. Otherwise, ✅

@stmontgomery
Copy link
Contributor Author

I've gotten confirmation offline that the typed throws is back-deployable.

@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@stmontgomery stmontgomery merged commit 20c4440 into main Sep 5, 2024
3 checks passed
@stmontgomery stmontgomery deleted the graph-typed-throws branch September 5, 2024 15:19
@grynspan grynspan added this to the Swift 6.1 milestone Sep 10, 2024
artemcm added a commit that referenced this pull request Sep 11, 2024
stmontgomery pushed a commit that referenced this pull request Sep 11, 2024
Reverts #662 This change is likely the culprit for crashes on the CI bot: [Swift Incremental RA - macOS - Apple Silicon](https://ci.swift.org/job/oss-swift-incremental-RA-macos-apple-silicon/)
stmontgomery added a commit that referenced this pull request Sep 16, 2024
This un-reverts the changes originally landed in #662. Those changes were reverted in #679 due to a compiler issue which broke CI builds. We believe that compiler issue has been resolved via a revert in the Swift repo, made in swiftlang/swift#76435. Before landing this (currently draft) PR, I plan to validate that Swift's CI is no longer affected using a cross-repo CI toolchain build. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

embedded-swift 📟 Embedded Swift issues enhancement New feature or request

3 participants