GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix missing comma in @_expose attribute for SwiftSyntax602 (#555) · tayloraswift/JavaScriptKit@36d4c73

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • test.yml
  • Plugins/BridgeJS
    • Package.swift
    • Sources/BridgeJSCore
      • ImportTS.swift
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/test.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/test.yml
+27Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,33 @@ jobs:
6767
- run: swift test --package-path ./Plugins/PackageToJS
6868
- run: swift test --package-path ./Plugins/BridgeJS
6969

70+
test-bridgejs-against-swift-versions:
71+
name: Test BridgeJS against Swift versions
72+
strategy:
73+
matrix:
74+
entry:
75+
- image: "swift:6.1.2"
76+
swift-syntax-version: "601.0.0"
77+
- image: "swift:6.2"
78+
swift-syntax-version: "602.0.0"
79+
runs-on: ubuntu-latest
80+
container:
81+
image: ${{ matrix.entry.image }}
82+
steps:
83+
- uses: actions/checkout@v6
84+
- name: Setup Node.js
85+
uses: actions/setup-node@v4
86+
with:
87+
node-version: '20'
88+
- name: Install TypeScript
89+
run: npm install --prefix Plugins/BridgeJS/Sources/TS2Swift/JavaScript
90+
- name: Run BridgeJS tests
91+
# NOTE: Seems like the prebuilt SwiftSyntax binaries are not compatible with
92+
# non-macro dependents, so disable experimental prebuilts for now.
93+
run: swift test --disable-experimental-prebuilts --package-path ./Plugins/BridgeJS
94+
env:
95+
BRIDGEJS_OVERRIDE_SWIFT_SYNTAX_VERSION: ${{ matrix.entry.swift-syntax-version }}
96+
7097
native-build:
7198
# Check native build to make it easy to develop applications by Xcode
7299
name: Build for native target
Collapse file

‎Plugins/BridgeJS/Package.swift‎

Copy file name to clipboardExpand all lines: Plugins/BridgeJS/Package.swift
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
import CompilerPluginSupport
44
import PackageDescription
55

6+
let swiftSyntaxVersion = Context.environment["BRIDGEJS_OVERRIDE_SWIFT_SYNTAX_VERSION"] ?? "600.0.1"
7+
68
let package = Package(
79
name: "BridgeJS",
810
platforms: [.macOS(.v13)],
911
dependencies: [
10-
.package(url: "https://github.com/swiftlang/swift-syntax", from: "600.0.1"),
12+
.package(url: "https://github.com/swiftlang/swift-syntax", from: Version(swiftSyntaxVersion)!),
1113
// Development dependencies
1214
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.7.0"),
1315
],
Collapse file

‎Plugins/BridgeJS/Sources/BridgeJSCore/ImportTS.swift‎

Copy file name to clipboardExpand all lines: Plugins/BridgeJS/Sources/BridgeJSCore/ImportTS.swift
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -760,10 +760,11 @@ enum SwiftCodePattern {
760760
return AttributeListSyntax {
761761
#if canImport(SwiftSyntax602)
762762
let exposeAttrArgs = AttributeSyntax.Arguments.argumentList(
763-
[
764-
LabeledExprSyntax(label: nil, expression: DeclReferenceExprSyntax(baseName: "wasm")),
765-
LabeledExprSyntax(label: nil, expression: StringLiteralExprSyntax(content: abiName)),
766-
]
763+
LabeledExprListSyntax {
764+
LabeledExprSyntax(label: nil, expression: DeclReferenceExprSyntax(baseName: "wasm"))
765+
.with(\.trailingComma, .commaToken())
766+
LabeledExprSyntax(label: nil, expression: StringLiteralExprSyntax(content: abiName))
767+
}
767768
)
768769
let cdeclAttrArgs = AttributeSyntax.Arguments.argumentList(
769770
[

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.