Skip to content

BridgeJS: SwiftSyntax's BasicFormat usage in code generators takes too much time #512

Description

@MaxDesiatov

Paste following TypeScript code into PlayBridgeJS in bridge-js.d.ts tab (or open this link https://swiftwasm.org/JavaScriptKit/PlayBridgeJS/?code=H4sIAAAAAAAAE6tWKi7PTCtRslLS11fwL0jNU0hIKspMSU%2FVzSrWS9ErKU5QKElMUtJRSikpBipKrSjILypRSCvNSy7JzM9TSE8tcU7MK0ss1qiwUiguKcrMS9e0UvAI8fWBCLvmpOam5pVYK9UCANyqcRdpAAAA&enc=gzip-b64)

export function getCanvas(x: string): HTMLCanvasElement;

this will make the page hang for long time (a minute or two), then producing an error displayed above the text input that's not actionable:

[...]
JavaScriptKit/node_modules/typescript/lib/lib.dom.d.ts:8654:4: warning: Unknown non-nominal type: IDBObjectStore | IDBIndex | IDBCursor
JavaScriptKit/node_modules/typescript/lib/lib.dom.d.ts:377:4: warning: Unknown non-nominal type: boolean | MediaTrackConstraints
JavaScriptKit/node_modules/typescript/lib/lib.dom.d.ts:8545:4: warning: Unknown non-nominal type: IDBValidKey | IDBKeyRange
BridgeJSTool/ImportTS.swift:75: Assertion failed: For now, we require a single parameter to be lowered to a single Wasm core type
[5/8] Import TypeScript API
error: Plugin ended with exit code 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions