Stream: git-wasmtime

Topic: wasmtime / Issue #2204 CodegenError should have optional ...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2020 at 16:51):

fitzgen opened Issue #2204:

pretty_error should be replaced with methods on CodegenError that mutate the error and provide the context that pretty_error otherwise adds, and the CodegenError's Display impl should print what pretty_error creates when it has the necessary context.

These context-adding methods would be similar to how the wast crate adds file contents and filename context to errors with these methods:

Then we can delete pretty_error, and avoid using string as an error type in more places (notably in cranelift-filetests and its pretty_anyhow_error workaround).

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2020 at 16:51):

fitzgen labeled Issue #2204:

pretty_error should be replaced with methods on CodegenError that mutate the error and provide the context that pretty_error otherwise adds, and the CodegenError's Display impl should print what pretty_error creates when it has the necessary context.

These context-adding methods would be similar to how the wast crate adds file contents and filename context to errors with these methods:

Then we can delete pretty_error, and avoid using string as an error type in more places (notably in cranelift-filetests and its pretty_anyhow_error workaround).

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2020 at 16:51):

fitzgen labeled Issue #2204:

pretty_error should be replaced with methods on CodegenError that mutate the error and provide the context that pretty_error otherwise adds, and the CodegenError's Display impl should print what pretty_error creates when it has the necessary context.

These context-adding methods would be similar to how the wast crate adds file contents and filename context to errors with these methods:

Then we can delete pretty_error, and avoid using string as an error type in more places (notably in cranelift-filetests and its pretty_anyhow_error workaround).

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2020 at 16:51):

github-actions[bot] commented on Issue #2204:

Subscribe to Label Action

cc @bnjbvr

<details>
This issue or pull request has been labeled: "cranelift"

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

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

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2020 at 17:18):

bjorn3 commented on Issue #2204:

pretty_error takes a reference to isa and func. Doing this would require CodegenError to borrow from them.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2020 at 17:48):

fitzgen commented on Issue #2204:

The idea is to take copies of the data gathered from those things and store them into the error, rather than borrow those things.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2020 at 18:24):

bjorn3 commented on Issue #2204:

pretty_error needs the entire function, as the error shows the full function source. From the target isa it needs the register_info and encoding_info.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 17:59):

taegyunkim commented on Issue #2204:

I'd like to take this issue. Is anyone looking into this?

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 19:09):

fitzgen commented on Issue #2204:

It's all you @taegyunkim!


Last updated: Nov 22 2024 at 16:03 UTC