-
Notifications
You must be signed in to change notification settings - Fork 105
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
Map error locations to original location via source map #42
Conversation
so that instead of unhelpful error locations in the `.wat` or `.wasm` file upon trap, we put in the corresponding location in the ActorScript.
as an npm package, and also including a nix derivation for it.
and make sure that the nix environment provides it.
Ok, this is good to go, but I fear that it will interfere with @rossberg and @crusso’s current development environment, so I’d like to get a review here. Basically there is a small useful script (happens to be written in JS) that I would like to use in the test suite, called
So basically either deal with The stability of the trap locations in the testsuite is only a minor thing (and I can still use |
this is cherry-picked from #42
I guess now that everyone is using nix, this little feature would be possible. Although it is only half as useful as long as v8 does not report the position of an |
V8 can actually report it, but the C API currently doesn't propagate that information. I just opened WebAssembly/wasm-c-api#54 for this. |
## Changelog for ic-hs: Branch: master Commits: [dfinity/ic-hs@4692d0af...c30a8c52](dfinity/ic-hs@4692d0a...c30a8c5) * [`c30a8c52`](dfinity/ic-hs@c30a8c5) Configure mergify ([dfinity/ic-hs#42](http://r.duckduckgo.com/l/?uddg=https://github.com/dfinity/ic-hs/issues/42))
## Changelog for ic-hs: Branch: master Commits: [dfinity/ic-hs@4692d0af...c30a8c52](dfinity/ic-hs@4692d0a...c30a8c5) * [`c30a8c52`](dfinity/ic-hs@c30a8c5) Configure mergify ([dfinity/ic-hs#42](http://r.duckduckgo.com/l/?uddg=https://github.com/dfinity/ic-hs/issues/42))
## Changelog for ic-wasm: Branch: main Commits: [dfinity/ic-wasm@496f63f6...0cc218f2](dfinity/ic-wasm@496f63f...0cc218f) * [`0cc218f2`](dfinity/ic-wasm@0cc218f) Aggressive inlining options for `wasm-opt` ([dfinity/ic-wasm#42](https://togithub.com/dfinity/ic-wasm/issues/42))
## Changelog for ic-wasm: Branch: main Commits: [dfinity/ic-wasm@496f63f6...0cc218f2](dfinity/ic-wasm@496f63f...0cc218f) * [`0cc218f2`](dfinity/ic-wasm@0cc218f) Aggressive inlining options for `wasm-opt` ([dfinity/ic-wasm#42](https://togithub.com/dfinity/ic-wasm/issues/42))
Thanks to @FloorLamp we now have source maps, and we can use this to post-process the trap messages by
wasm
to make them both more useful, and more stable as the compiler output changes, by mapping them to the original location in the actorscript file.This needs a bit more cleanup, in particular about the plumbing where to find this script.
I am tempted to redo the whole test suite in
bash
or something.