Skip to content

Fix Swift Testing error matcher failing on Linux - #1657

Merged
yonaskolb merged 1 commit into
masterfrom
fix-linux-swift-testing
Oct 13, 2026
Merged

yonaskolb merged 1 commit into
masterfrom
fix-linux-swift-testing

Conversation

@yonaskolb

@yonaskolb yonaskolb commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

InvalidConfigsMappingFormatTests fails on Linux CI now that the newer ubuntu runner image runs Swift Testing tests (example: https://github.com/yonaskolb/XcodeGen/actions/runs/38357691066).

The error matcher coerced the thrown any Error with as any CustomStringConvertible. That coercion goes through NSError bridging, which on Darwin forwards to the Swift error's description but on Linux produces the generic NSError description, so the comparison fails even though the correct SpecParsingError is thrown.

The matcher now casts to SpecParsingError and compares its description. This was the only Swift Testing test using the pattern.

🤖 Generated with Claude Code

Cast the thrown error to SpecParsingError instead of coercing it to
CustomStringConvertible, which goes through NSError bridging and yields a
different description on Linux.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yonaskolb
yonaskolb merged commit e74b1e1 into master Oct 13, 2026
6 checks passed
@yonaskolb
yonaskolb deleted the fix-linux-swift-testing branch October 13, 2026 08:43
yonaskolb added a commit that referenced this pull request Oct 13, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant