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

winch: Gracefully handle compilation errors #8096

Open
saulecabrera opened this issue Mar 12, 2024 · 1 comment · May be fixed by #9851
Open

winch: Gracefully handle compilation errors #8096

saulecabrera opened this issue Mar 12, 2024 · 1 comment · May be fixed by #9851
Assignees
Labels
winch Winch issues or pull requests

Comments

@saulecabrera
Copy link
Member

The default behaviour in Winch is to panic when an invariant is broken at compile time. This behavior is not friendly for all embedders, as it might be painful to recover from an erroneous compilation. Instead we could try to gracefully handle compilation errors.

@saulecabrera saulecabrera converted this from a draft issue Mar 12, 2024
@saulecabrera saulecabrera added the winch Winch issues or pull requests label Mar 12, 2024
Copy link

Subscribe to Label Action

cc @saulecabrera

This issue or pull request has been labeled: "winch"

Thus the following users have been cc'd because of the following labels:

  • saulecabrera: winch

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@saulecabrera saulecabrera self-assigned this Dec 4, 2024
@saulecabrera saulecabrera moved this to In Progress in Winch Dec 4, 2024
saulecabrera added a commit to saulecabrera/wasmtime that referenced this issue Dec 18, 2024
Closes: bytecodealliance#8096

This commit threads `anyhow::Result`  through most of Winch's
compilation process in order to gracefully handle compilation errors
gracefully instead of panicking.

The error classification is intentionally very granular, to avoid string
allocation which could impact compilation performance.

The errors are largely fit in two categories:

* Unimplemented/Unsupported
* Internal

The firs category signals partial or no support for Wasmtime features
and or Wasm proposals. These errors are meant to be temporary while
such features or proposals are in development.

The second category signals that a compilation invariant was not met.
These errors are considered internal and their presence usually means
a bug in the compiler.
@saulecabrera saulecabrera linked a pull request Dec 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
winch Winch issues or pull requests
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant