Skip to content
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

Replace rethrows with typed throws in Graph #662

Merged
merged 3 commits into from
Sep 5, 2024
Merged

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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants