Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wit/bindgen: fix wasm-tools WIT generation bugs #287

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

ydnar
Copy link
Collaborator

@ydnar ydnar commented Jan 20, 2025

Errors from wasm-tools were being silently swallowed, masking a number of related issues:

  1. WIT keywords in qualified interface or package names (like import foo:foo/flags were not being escaped (foo:foo/%flags).
  2. Errors from wasm-tools invocations (in wasm) were being silently ignored. They are now logged and returned. Errors returned from wasm-tools component embed are now fatal.
  3. Testdata tests in package wit/bindgen now supply a logger to Go().

The synthetic world now uses the original WIT package, to allow inline import foo: interface { ... } with inline use statements that refer to other interfaces or worlds in the same package.

Fixes #281.

@ydnar ydnar self-assigned this Jan 21, 2025
@ydnar ydnar marked this pull request as ready for review January 21, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bindgen 0.5.0 fails to handle (transitive?) versioned imports
1 participant