swiftlang / swift-testing

A modern, expressive testing package for Swift
Apache License 2.0
1.69k stars 68 forks source link

Replace rethrows with typed throws in Graph #662

Closed stmontgomery closed 1 week ago

stmontgomery commented 1 week ago

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:

Result:

No behavioral/runtime change.

Checklist:

stmontgomery commented 1 week ago

@swift-ci please test

stmontgomery commented 1 week ago

@swift-ci please test

grynspan commented 1 week ago

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

stmontgomery commented 1 week ago

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

stmontgomery commented 1 week ago

@swift-ci please test