-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Labels
winch
Winch issues or pull requests
Comments
Subscribe to Label Action
This issue or pull request has been labeled: "winch"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
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
added a commit
to saulecabrera/wasmtime
that referenced
this issue
Jan 1, 2025
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.
github-merge-queue bot
pushed a commit
that referenced
this issue
Jan 1, 2025
* winch: Gracefully handle compilation errors Closes: #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. * Include `Result` in the MacroAssembler This commit updates the MacroAssembler trait to require returning `Result<T>` on every method in the interface, making it easier to detect partial support for Masm instructions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: