Make exception handling models better configurable for the wasm kernel#440
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #440 +/- ##
=======================================
Coverage 81.25% 81.25%
=======================================
Files 21 21
Lines 864 864
Branches 78 78
=======================================
Hits 702 702
Misses 162 162 🚀 New features to boost your workflow:
|
|
cc @SylvainCorlay the doubt I had here is related to If you see what's done here, xeus hardcodes the EH model based on the emscripten version number. Which means if we are building using |
There was a problem hiding this comment.
My understanding is that we want this change so xeus-cpp can remain compatible with the emsdk 3 branch on Emscripten forge which doesn't use wasm exceptions. So that we know the build is agnostic to the EMCC_CFLAGS from whatever emsdk version that user uses from emscripten forge I think this environment variable should be unset in the ci to stop it overwriting whatever the user has set for XEUS_CPP_WASM_KERNEL_EXTRA_FLAGS (probably want it unset in build instructions too). This should also allow CppInterOp to drop references to EMCC_CFLAGS when building xeus-cpp which it currently needs to do.
I would also like to be able to test this PR against CppInterOps ci.
One final remark, which I honestly don't know the answer to, does this test need to change depending on what exception model you use https://github.com/anutosh491/xeus-cpp/blob/3299d5c599fa220466c7751c4af279f4c6e22678/test/test_interpreter.cpp#L145 ?
|
CI has nothing to do here according to me. xeus-cpp/environment-wasm-build.yml Lines 3 to 7 in 12c4570 We are using the emsdk (and all the dependencies) from the 4-x channel right ? Which means it will be activated with wasm exceptions right ? That's exactly what we want in the CI. This PR is only meant to allow users to configure the EH model according to what they want. We would prefer and want the wasm EH model which is exactly what the CI does. We won't be adding any duplication or testing the other EH model in the CI. Offcourse, this would only work under the wasm exception model (and no we don't care to test it under the emscripten EH model !) xeus-cpp/test/test_interpreter.cpp Lines 142 to 150 in 12c4570 We can clearly mention that going forward our effort would be done with respect to the wasm EH model, if still someone wants to build xeus-cpp with another EH model, they can do it and even try stuff out (I've pasted an image above showing it works, but our default testing wouldn't account for that) |
|
gentle ping @SylvainCorlay |
3299d5c to
18f3724
Compare
I noticed the issue with the PR in CppInterOp which tested these changes against its ci. The Windows ci is now passing, and I have no more objections to this PR in its current form.
|
Thanks for the reviews Sylvain & Matthew. Merging ! |


Description
This PR makes the wasm kernel better configurable towards exception handling model (native wasm exceptions or JS based exceptions or any others)
Type of change
Please tick all options which are relevant.