Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix error descriptions Embedded Swift compatibility#759

Merged
MaxDesiatov merged 2 commits into
mainswiftwasm/JavaScriptKit:mainfrom
maxd/embedded-swift-errorswiftwasm/JavaScriptKit:maxd/embedded-swift-errorCopy head branch name to clipboard
Jun 9, 2026
Merged

Fix error descriptions Embedded Swift compatibility#759
MaxDesiatov merged 2 commits into
mainswiftwasm/JavaScriptKit:mainfrom
maxd/embedded-swift-errorswiftwasm/JavaScriptKit:maxd/embedded-swift-errorCopy head branch name to clipboard

Conversation

@MaxDesiatov

Copy link
Copy Markdown
Member

The BridgeJS generator emits JSError(message: String(describing: error)) for throwing @JS exports, but String.init(describing:) is unavailable in Embedded Swift, so embedded Wasm builds of any package with a throwing export fail. The caught error is statically a JSException with a stored description, so the generated glue now uses error.description for identical output. Snapshots regenerated.

The BridgeJS generator emits `JSError(message: String(describing: error))` for throwing `@JS` exports, but `String.init(describing:)` is unavailable in Embedded Swift, so embedded Wasm builds of any package with a throwing export fail. The caught error is statically a `JSException` with a stored `description`, so the generated glue now uses `error.description` for identical output. Snapshots regenerated.
@MaxDesiatov MaxDesiatov added the bug Something isn't working label Jun 9, 2026
@MaxDesiatov MaxDesiatov requested a review from krodak June 9, 2026 19:25
@MaxDesiatov MaxDesiatov enabled auto-merge (squash) June 9, 2026 19:56
@MaxDesiatov MaxDesiatov merged commit 453b841 into main Jun 9, 2026
13 checks passed
@MaxDesiatov MaxDesiatov deleted the maxd/embedded-swift-error branch June 9, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.