{{ message }}
BridgeJS: Deduplicate closure signature collection logic#605
Merged
kateinoigakukun merged 1 commit intoFeb 9, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Centralizes BridgeType traversal in BridgeJSSkeleton so closure signatures can be collected consistently by both BridgeJSCore (Swift codegen) and BridgeJSLink (JS glue generation), removing duplicated traversal code.
Changes:
- Added a
BridgeTypeVisitor+BridgeTypeWalkertraversal utility and aClosureSignatureCollectorVisitor. - Updated
BridgeJSLinkto use the new walker/visitor instead of bespoke collection helpers. - Updated
ClosureCodegento use the new walker/visitor instead of bespoke collection helpers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Plugins/BridgeJS/Sources/BridgeJSSkeleton/BridgeJSSkeleton.swift | Introduces the visitor/walker traversal utilities and a shared closure-signature collector. |
| Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift | Switches JS glue generation to use the shared closure-signature collection logic. |
| Plugins/BridgeJS/Sources/BridgeJSCore/ClosureCodegen.swift | Switches Swift closure-support codegen to use the shared closure-signature collection logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Centralize the `BridgeType` traversal logic and use it to collect closure signatures in both `BridgeJSCore` and `BridgeJSLink`, removing redundant code. This is mostly NFC but added new closure signature collection paths for `.array` and `.dictionary` element types and for enums with associated values.
fe71f38 to
874c625
Compare
February 9, 2026 02:29
Hide details
View details
kateinoigakukun
merged commit
235a9bd
into
main
Feb 9, 2026
10 of 11 checks passed
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
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.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.
Centralize the
BridgeTypetraversal logic and use it to collect closure signatures in bothBridgeJSCoreandBridgeJSLink, removing redundant code.This is mostly NFC but added new closure signature collection paths for
.arrayand.dictionaryelement types and for enums with associated values.