-
Notifications
You must be signed in to change notification settings - Fork 37
Update wasm exception handling model (migration to emsdk 4-x) #416
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #416 +/- ##
=======================================
Coverage 81.94% 81.94%
=======================================
Files 21 21
Lines 853 853
Branches 87 87
=======================================
Hits 699 699
Misses 154 154 🚀 New features to boost your workflow:
|
|
Once ready, add test We were somewhat checking the older emscripten EH model here |
|
Once its ready will this PR fix this issue #412 given it involves mentions of |
Well the changes above technically come in at runtime to generate correct wasm from the LLVM module. Feel free to compare the 2 wasms actually
Compare something like to see the difference in symbols. What you are talking about is build time stuff. So although relevant, not addressed through the above changes just yet. Let me address them though ! |
|
clang-tidy review says "All clean, LGTM! 👍" |
7 similar comments
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
Cc @SylvainCorlay @DerThorsten Pinging for reviews (and then we can make a minor release I think) |
|
I'll release 4.3.1 |
|
It's baking, it will be installable with pip in a couple of minutes. Published on conda-forge later today/tomorrow. |
|
Thanks again for the quick fix 😁 |
|
Arghh I still see this
cc @martinRenou The error message says this : Is this somehow related to how we've built cppinterop on emscripten-forge 🤔 ? The build is here : https://prefix.dev/channels/emscripten-forge-4x/packages/cppinterop |
|
Is this a local jupyterlite build? Can you share me the setup you have? Especially the |
Nope, just following the readme (where we setup the xeus-lite-host env)
|
|
Ok, so I think it has to do booting from a locally built prefix.
The packages that don't have channels, you built those locally, right? |
|
Mmh no that's not what you're saying sorry |
|
@anutosh491 Not sure if this will help you debug the issue, but CppInterOps 4.0.9 xeus-cpp build (demo available here https://mcbarton.github.io/xeus-cpp-demo/lab/index.html ) does reference the correct channel as can be seen here Its not able to install symengine however due to channel priority. Its packages get excluded to the presence of the dev channel. |
|
The bug is that jupyterlite-xeus is wrongfully injecting default channels "emscripten-forge-dev". For quite some time this was the main used channel so it was fine. I'll mitigate this in jupyterlite/xeus#328 |
The smallpt notebook doesn't work for CppInterOps 4.0.9 xeus-cpp build here https://mcbarton.github.io/xeus-cpp-demo/lab/index.html , but does for the jupyter lite preview for this PR. @anutosh491 any idea what may be causing the difference? I get the above error message.
The xeus-cpp-lite-demo notebook works completely fine. |
|
Hey @mcbarton Probably let's not pollute the discussion here with what's happening in cppinterop ? Maybe let's discuss somewhere else (github/discord) ? |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
As discussed with @martinRenou, we would need to pass the default channels/channels of interest while creating the host env/Prefix .... so that
|
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
You've linked this PR to this issue #387 . In that issue you say you'll close it during the migration, adding a test to show it now works. I cannot see the test. Can you add one? |
I realized adding a test doesn't help (unless we can test the notebook directly ... which your is trying to achieve I think) Cause we just have a wrong output, it's not a failure. So framing a test with the execute_request would just pass cause technically the execute_repl is okay and we have an output (it's just the wrong output) On 3-x
On 4-x
EDIT : This is technically an emscripten 3-x bug as such (which they fixed in 4-x and hopefully also are testing it) , not something we should test . We're just the frontend here ;) So every emscripten standard library (libc etc etc) based bug is a xeus-cpp-lite bug haha and we just need to report it upstream |









Description
Hi,
Today while building xeus-cpp on emscripten-forge's emscripten-4x branch, I saw this
This was expected because
-fwasm-exceptionsand-sSUPPORT_LONGJMP=wasm)-fwasm-exceptionspulls in the following-sSUPPORT_LONGJMP=wasmwhich is an emcc specific flag boils down to-mllvm -wasm-enable-sjljwhich can be used through clang.So basically we end up replicating the same result but with a different exception handling model.

Type of change
Please tick all options which are relevant.