Commit e6efbf4
Fix missing comma in @_expose attribute for SwiftSyntax602
The SwiftSyntax602 code path in `buildExposeAttributes` was using array
literal syntax to construct `LabeledExprListSyntax`, which doesn't set
`trailingComma` on the AST nodes. This resulted in malformed attributes:
`@_expose(wasm "name")` instead of `@_expose(wasm, "name")`.
The fix uses the result builder syntax with explicit `.with(\.trailingComma,
.commaToken())` to ensure the comma is present in the generated code.
Also adds a dedicated `bridgejs-test` CI job that tests BridgeJS with
multiple Swift/SwiftSyntax version combinations to ensure both code paths
(pre-602 and 602+) are exercised:
- Swift 6.0.3 with SwiftSyntax 600.0.1
- Swift 6.1.2 with SwiftSyntax 601.0.1
- Swift 6.2 with SwiftSyntax 602.0.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 8784a38 commit e6efbf4
File tree
2 files changed
+36
-4
lines changed- .github/workflows
- Plugins/BridgeJS/Sources/BridgeJSCore
2 files changed
+36
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
62 | 93 | | |
63 | 94 | | |
64 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
767 | 768 | | |
768 | 769 | | |
769 | 770 | | |
| |||
0 commit comments