Install fallback event handler before running tests#1523
Merged
jerryjrchen merged 4 commits intoswiftlang:mainfrom Mar 5, 2026
Merged
Install fallback event handler before running tests#1523jerryjrchen merged 4 commits intoswiftlang:mainfrom
jerryjrchen merged 4 commits intoswiftlang:mainfrom
Conversation
grynspan
reviewed
Feb 3, 2026
84bca01 to
d75f33b
Compare
d48227f to
9bdd325
Compare
9bdd325 to
b2ab1dd
Compare
stmontgomery
reviewed
Mar 3, 2026
stmontgomery
reviewed
Mar 3, 2026
stmontgomery
reviewed
Mar 3, 2026
stmontgomery
reviewed
Mar 3, 2026
| if let abi { | ||
| let recordJSON = UnsafeRawBufferPointer( | ||
| start: recordJSONBaseAddress, count: recordJSONByteCount) | ||
| try! Self.handle(recordJSON, encodedWith: abi) |
Contributor
There was a problem hiding this comment.
Can you talk about why you believe it's safe/appropriate to try! here? Would be nice to capture that in a comment (though not critical), but my main question is whether it's actually safe
Contributor
Author
There was a problem hiding this comment.
Hmm, I think I actually want to do some logging here instead of the try!. My initial intention was that we didn't want to let errors silently slip by because the handler failed to decode the message. I'm going to record an issue with the error (and add a test for that behaviour too)
Contributor
Author
There was a problem hiding this comment.
I came up with a somewhat clunky error message, but at the very least it should provide plenty of context for this rare failure mode.
stmontgomery
reviewed
Mar 3, 2026
stmontgomery
reviewed
Mar 3, 2026
Swift Testing now participates in both directions of interoperability. Currently, this is opt-in via an environment variable at runtime. This only implements the "complete" interop mode -- follow-up changes will add interop configurability. Test
cbed514 to
fd87a70
Compare
stmontgomery
approved these changes
Mar 4, 2026
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Swift Testing now participates in both directions of interoperability. Currently, this is opt-in via an environment variable at runtime.
Motivation:
Allows Swift Testing to handle foreign test events (e.g. XCTAssert).
Modifications:
Install fallback event handler before running tests.
Checklist: