-
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) |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
cc @martinRenou I just tested the emscripten 4-x support PR (jupyterlite/xeus#311) using latest jupyterlite-xeus 4.3.0 Works just like we would want :) The latest commit removes pin on jupyterlite-core (which is anyways fetched with jupyterlite-xeus I think) EDIT : I see this on my local build though
Do you know why this might be happening ? With jupyterlite-xeus 4.2.2, I see
|
|
Sure, this is a bug on mambajs's side. I'll have a look and release a patch of jupyterlite-xeus with it soon-ish |
|
emscripten-forge/mambajs#181 should fix it |
Even though it "looks" like it works, it's quite broken as well. If you look carefully the logs you'll see that it switches all of your libraries to the emscripten-forge-dev channel (goes back to emscripten-abi 3.x). But 4.2.2 is not supposed to work with emscripten 4.x so I won't fix it. |
|
Yupp makes sense. Thanks a lot for the fix. I shall try it out once you make some sort of release I guess!? |
|
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! 👍" |







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.