-
Notifications
You must be signed in to change notification settings - Fork 86
Changes to be able to build to webassembly with emscripten. #201
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
I've ignored the file in codacy: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh build per bruno's steps and then run tests via: |
@bruno-j-nicoletti can you add one more item to this PR which is adding a CI run to build and compile with emscripten and run the tests please? I was able to get it to work locally so it shouldn't be too difficult to automate it. |
I've added a CI pass for webassmbly and I've had to tweak test_task.cpp as em++ seems to be adding padding to std::detail::promise |
I'll rebase once it completes and run the test suite one more time. This is an awesome change :) |
There seems to be a new flaky test thats been introduced, doesn't really seem to be anything related to your change osit... but clang-16 just doesn't want to finish it seems. |
The only change I could have made that might have done this is the flip to use std::thread over std::jthread. I could put the compile time switch back in to see if that works. |
Yeah, I really don't see why your change is causing this. I'm going to try and replicate locally... |
running ubuntu 22.04 with g++-12 dosen't hang like it is here, I might try in a docker container with more constrained resourcecs... but its weird too because other PRs based off |
|
I'll try running CI on main and see if it replicates but so far I haven't seen this on anything merged recently which makes me think it's something with the std::thread change. |
fedora 36 has a dnf package manager problem atm, so until they fix that it will fail everytime. I've looked over the new failing ones and they've failed on a new spot... I'll try and take a deeper look soon. |
3rd time also passed, just weird package manager problems 🙄 |
So I had a bunch of fun with this today and I think I found the bug. It was what I originally thought but I believe the |
I've just made the memory order changes you suggested and pushed it. Getting relaxed memory ordering right is hard, which is why most things I've read say stick to the default of seq_cst. |
…ee where it hangs
Almost there! There is still a SEGV failure in the coverage test on Fedora. This only appeared when I tweaked the unit test to output via an XML reporter. I could change the reporter back to 'console', but it really shouldn't be crashing if you change the reporter. |
The failed test on fedora 32 is the ssl/tls bug I'm working through, so I retriggered that run. *edit: I just saw your message, we can remove the xml reporting, or make it an option. |
I also left just a few comments to really clean it up if you don't mind taking a look at them. |
I've removed the XML reporter and fixed the bits you requested. I can't see for the life of me why the precommit keeps doing weird thing the to readme. |
Heck yeah its passing :D :D |
There are a couple more |
Removed all the extraneous occurrences of seq_cst as requested. Parallel programming is hard. |
apt failed on ubuntu 22.04, i'll re-run it |
22.04 dies on installing requirements via apt. |
yeah, its a weird normal failure, I don't know why the package managers are so flaky but I see this all the time on lots of projects. Only way to really get around it is either self hosting or baking the installs into a docker file (which I don't really want to maintain) |
Looks likes its done then. Thanks for all the effort you put into figuring it out, and for the library in the first place. |
And we're merged! Nice job, its a great addition to support this. |
Hurrah! |
The main changes to get it to build with emscripten were...
To build it you need to download the emsdk and set it up you shell's paths appropriately. Then go...