-
Notifications
You must be signed in to change notification settings - Fork 3.4k
onRuntimeInitialized
no longer being called
#23626
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
Comments
No that is not intended. We do have quite a few test for Can you confirm that version in which this stopped working for you? Was it 4.0.0 exactly? Did it work in the previous version (3.1.74)? |
Yes, 4.0.0 exactly. You can see:
The implementation of |
onRuntimeInitialised
no longer being calledonRuntimeInitialized
no longer being called
Can you share the full list of linker flags that you use? Are you using |
I don't believe so this is the CMAKE file used @JanWielemaker would be the one who can confirm this. |
Specifically these are the linker flags used |
Can you show me how/where you inject your Lines 109 to 114 in 242af00
I don't see any One thing I was think of doing is adding an assertion if these things are added to the Module too late.. |
Aha thankyou! Looks like @JanWielemaker very recently converted Updating to include those changes indeed fixes things.
Yes, I think this would be useful |
Nope. It is the other way around. There used to be I think you should be able to update to 9.3.20. If you want to replicate my build
|
Have done - new version of swipl-wasm now released https://github.com/swI-Prolog/npm-swipl-wasm. Thanks for making the fix 🥳 |
We had some bug reports recently when we switched to using async/await in MODULUARIZE mode. One of the side effects was the `--post-js` code then runs after module instantiation and startup, which means assignment of properties like `onRuntimeInitialized` is too late if it happens in `--post-js`. This was always the case for sync instantiation too. We now detect this too-late-assignment at abort with a useful error. See emscripten-core#23626 and emscripten-core#23420
We had some bug reports recently when we switched to using async/await in MODULUARIZE mode. One of the side effects was the `--post-js` code then runs after module instantiation and startup, which means assignment of properties like `onRuntimeInitialized` is too late if it happens in `--post-js`. This was always the case for sync instantiation too. We now detect this too-late-assignment at abort with a useful error. See emscripten-core#23626 and emscripten-core#23420
We had some bug reports recently when we switched to using async/await in MODULUARIZE mode. One of the side effects was the `--post-js` code then runs after module instantiation and startup, which means assignment of properties like `onRuntimeInitialized` is too late if it happens in `--post-js`. This was always the case for sync instantiation too. We now detect this too-late-assignment at abort with a useful error. See emscripten-core#23626 and emscripten-core#23420
After #23629 lands you should see a clear error in debug build when these properties are set too late. |
We had some bug reports recently when we switched to using async/await in `MODULUARIZE` mode. One of the side effects was the `--post-js` code then runs after module instantiation and startup, which means assignment of properties like `onRuntimeInitialized` is too late if it happens in `--post-js`. This was always the case for sync instantiation mode. When assertions are enabled, we now detect this too-late-assignment and abort with a useful error. Code size regression in this PR, as expected, only for debug builds. See #23626 and #23420
As of v4 it appears that
onRuntimeInitialized
is no longer invoked after initialising a module.Is this expected behavior?
Observed in SWI-Prolog/swipl-devel#1343 (comment)
The text was updated successfully, but these errors were encountered: