Conversation
This PR enhances the JSON event stream to allow us to recognize and recover issues of kind `.expectationFailed`. This then improves the fidelity of these issues when passed through XCTest interop and exit test process boundaries. In the process of implementing this change, I was able to reconcile the issue-decoding logic used in interop and exit tests so they share an implementation. This PR also resolves an issue running interop tests inside Xcode 26.4 where the tests could spuriously fail.
grynspan
commented
Mar 5, 2026
| /// | ||
| /// - Parameters: | ||
| /// - expression: The encoded expression to initialize this instance from. | ||
| init?<V>(decoding expression: ABI.EncodedExpression<V>) { |
Contributor
Author
There was a problem hiding this comment.
Not ready to make this public/SPI yet.
…o-interop-and-exit-tests
grynspan
commented
Mar 5, 2026
| /// | ||
| /// If `event` does not represent a recorded issue, the initializer returns | ||
| /// `nil`. | ||
| init?<V>(decoding event: ABI.EncodedEvent<V>) { |
Contributor
Author
There was a problem hiding this comment.
Not ready to make these public/SPI yet.
stmontgomery
reviewed
Mar 5, 2026
Comment on lines
+166
to
+168
| // The known issue comment, if there was one, is already included in | ||
| // the `comments` array above. | ||
| self.knownIssueContext = Issue.KnownIssueContext() |
Contributor
There was a problem hiding this comment.
I know we separated the comment on withKnownIssue into a discrete field intentionally, so are we potentially conflating them by having them combined into a single field? (That might be a preexisting problem)
Contributor
Author
There was a problem hiding this comment.
As of right now, the known-issue comment isn't in the encoded form. It's something we can certainly look into as a separate PR.
Contributor
Author
There was a problem hiding this comment.
(The source comment itself is not new, but is out of date.)
stmontgomery
approved these changes
Mar 5, 2026
jerryjrchen
approved these changes
Mar 5, 2026
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.
This PR enhances the JSON event stream to allow us to recognize and recover issues of kind
.expectationFailed. This then improves the fidelity of these issues when passed through XCTest interop and exit test process boundaries.For example, given the following exit test:
We'll now get a breakdown of the failed expectation (note I recorded this example with
--verboseso type info would be visible too):In the process of implementing this change, I was able to reconcile the issue-decoding logic used in interop and exit tests so they share an implementation.
This PR also resolves an issue running interop tests inside Xcode 26.4 where the tests could spuriously fail.
Checklist: