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 — BridgeJS: fix: switch to direct TypeSyntax initialiser by krodak · Pull Request #445 · swiftwasm/JavaScriptKit

Conversation

@krodak

@krodak krodak commented Sep 11, 2025

Copy link
Copy Markdown
Member

This PR updates ExportSwift.lookupType to handle changes introduced in newer SwiftSyntax, that would result in failed compilation with errors like:

cannot convert value of type 'GenericArgumentSyntax.Argument' to expected argument type 'TypeSyntax'

This happened because in newer SwiftSyntax the .argument property of GenericArgumentSyntax no longer returns a TypeSyntax directly, but a new wrapper type (GenericArgumentSyntax.Argument).
I've just noticed this while working with other wasm32 Swift SDK with threads support, update approach should work properly for all sdk versions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@krodak
BridgeJS: fix: switch to direct TypeSyntax initialiser
79444b1
@krodak
krodak requested a review from kateinoigakukun September 11, 2025 07:47
@krodak krodak self-assigned this Sep 11, 2025
@kateinoigakukun
kateinoigakukun requested a review from Copilot September 11, 2025 07:48
Copilot AI reviewed Sep 11, 2025
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Fixes a compilation issue in BridgeJS by updating the handling of SwiftSyntax generic arguments to use direct TypeSyntax initializers instead of accessing the .argument property directly. This addresses breaking changes in newer SwiftSyntax versions where the argument property returns a wrapper type instead of TypeSyntax.

  • Updates generic argument handling to use TypeSyntax initializer for compatibility
  • Fixes two instances in the lookupType method for both identifier and member type handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift Resolved

Uh oh!

There was an error while loading. Please reload this page.

kateinoigakukun
kateinoigakukun reviewed Sep 11, 2025
View reviewed changes

@kateinoigakukun kateinoigakukun left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a runtime test case to cover the case to keep it compiled?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
kateinoigakukun
kateinoigakukun approved these changes Sep 11, 2025
View reviewed changes

@kateinoigakukun kateinoigakukun left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I was confused. Given that it's an issue at the compile-time of BridgeJSCore, we don't need a runtime test case 🙇

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

krodak reacted with laugh emoji
All reactions
  • 😄 1 reaction
@kateinoigakukun
kateinoigakukun enabled auto-merge September 11, 2025 07:58
@kateinoigakukun
kateinoigakukun merged commit a069e3a into swiftwasm:main Sep 11, 2025
@scottmarchant scottmarchant mentioned this pull request Oct 30, 2025
PassiveLogic Swift WebAssembly Open Source Contributions PassiveLogic/swift-web-examples#1
Open
56 of 68 tasks
@krodak
krodak deleted the fix/type-syntax-optional branch November 20, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@kateinoigakukun kateinoigakukun kateinoigakukun approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@krodak krodak

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@krodak @kateinoigakukun
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.
You are visitor 01402503 — 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.