-
Notifications
You must be signed in to change notification settings - Fork 31
Frame tests for loading shared objects for the emscripten build #548
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@anutosh491 Just a couple of questions. Once this PR is ready will we be able to run the DynamicLibraryManagerTest Sanity test? Currently its skipped. Does this PR have any relation to this PR? #308 |
Explaining the use-case/roadmap here Symengine a Computer Algebra System with 1.2k stars wants us to host a link in their Readme so that users there can try it as a REPL in the browser. Check this Steps to achieve this
Included when we build using these definitions Was able to get this working locally !!! This involves only having symengine in our wasm environment and no explicit linking/loading from our side. Any symengine header included would also load libsymengine.so . So to provide the link to symengine, we would just ask the maintainers to fork the template library (https://github.com/jupyterlite/xeus-lite-demo) under their symengine org (and probably ask them to name it Symengine/xeus-cpp-symengine-demo or whatever) . Here in the template they would just need to update the environment and add symengine to get the above working. |
Absolutely. This PR fixes that. EDIT: Actually to be fair not the Sanity test. The sanity test is not catered to the emscripten build.But we shall be able to add a custom test suitable for the emscripten build just like what I added (look at the test I added in the pr) The sanity test has
Things like llvm::sys etc would not work for emscripten. Also there is no real concept of search paths in wasm ( we know where the preload the shared lib in the MEMFS so we don't have to search for it )
The library autoloader PR is not focusing on loading dynamic libs while building against emscripten (or basically for our wasm use case) as per my knowledge. So the idea might have some relation but the use case is different. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #548 +/- ##
==========================================
- Coverage 76.45% 76.36% -0.10%
==========================================
Files 9 9
Lines 3648 3655 +7
==========================================
+ Hits 2789 2791 +2
- Misses 859 864 +5
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
Just in case, anyone would like to try this through lite.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
The tests don't cover all the lines of the patch. Please fix this. |
Weird
I don't know how the above codecov report works but the test added is literally to address this :) EDIT : Hmmm, I see the codecov/patch && codecov/project fail even before the emscripten test is run ( the emscripten builds were going on and these jobs already failed) EDIT 2 : This should confirm the those patches are tested http://github.com/compiler-research/CppInterOp/actions/runs/15027746990/job/42232690523?pr=548#step:9:708 |
Just had a look and this seems to be a result of us moving away from We probably need some way to have code coverage number for Emscripten if possible, but that is another issue to this PR entirely. |
Arghh, I thought using target opts here is a more organic solution but if we can't then probably we can't :\ |
Hey @vgvassilev The other day I addressed your reviews here but we see this after I got rid of the hardcoding. To which I make this comment #548 (comment) saying what you suggested seems the organic way to get this but it might not be covered through codecov. Let us know what you think ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
We should move away from that hardcoding but in a separate PR that covers the tests. |
Description
Now that llvm/llvm-project#133037 has been merged, we should be able to test out loading shared libraries for the emscripten build.
Type of change
Please tick all options which are relevant.
Testing
Please describe the test(s) that you added and ran to verify your changes.
Checklist