Skip to content

Conversation

mho22
Copy link
Collaborator

@mho22 mho22 commented Aug 29, 2024

Based on issue #1241.

This is an initial pull request version. I may need further guidance to ensure it is ready for merging.

Copy link
Collaborator

@adamziel adamziel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much! Looks great to me. I'll hold on with merging until next week to make sure someone's online to revert just in case.

@mho22
Copy link
Collaborator Author

mho22 commented Sep 2, 2024

@adamziel I'm currently trying to run the composer PHAR file in php-wasm/web, but I'm encountering the following stack trace when running php.cli( [ 'php', 'composer.phar', 'install' ] );:

Uncaught (in promise) RuntimeError: null function or function signature mismatch at 032749f6:0xdfebf at 032749f6:0x7e623 at 032749f6:0x2c68d9 at 032749f6:0x6a6ec2 at 032749f6:0x707bcc at 032749f6:0x74b9b4 at 032749f6:0x2e9fbe at 032749f6:0x6eb13e at 032749f6:0x6ae8a1 at ret.<computed> (php_8_2.js:43:72504)Caused by: Error at Asyncify.handleSleep (php_8_2.js:60:49) at _emscripten_sleep (php_8_2.js:43:39745) at 032749f6:0xddacd at 032749f6:0x6a6dbe at 032749f6:0x707bcc at 032749f6:0x74b9b4 at 032749f6:0x2e9fbe at 032749f6:0x6eb13e at 032749f6:0x6ae8a1 at ret.<computed> (php_8_2.js:43:72504) 

with :

Uncaught RuntimeError: unreachable at 032749f6:0x6e6706 at ret.<computed> (php_8_2.js:43:72504) at t.wasmExports.<computed> (index.js:522:18) at Object.doRewind (php_8_2.js:43:74168) at php_8_2.js:43:74741 at callUserCallback (php_8_2.js:43:37432) at php_8_2.js:43:39676Caused by: Error at Asyncify.handleSleep (php_8_2.js:60:49) at _emscripten_sleep (php_8_2.js:43:39745) at 032749f6:0xddacd at 032749f6:0x6a6dbe at 032749f6:0x707bcc at 032749f6:0x74b9b4 at 032749f6:0x2e9fbe at 032749f6:0x6eb13e at 032749f6:0x6ae8a1 at ret.<computed> (php_8_2.js:43:72504) 

This stack trace looks somewhat familiar but is obviously hard to read. Do you have any insights or suggestions on how to make this more debuggable?

@adamziel
Copy link
Collaborator

adamziel commented Sep 3, 2024

@mho22 the Node.js build should give you the same error with all the c function names. I would so love to start shipping the JSPI build to the browser ms and server side environments that support it as it would solve all such errors in one swoop.

@mho22
Copy link
Collaborator Author

mho22 commented Sep 3, 2024

@adamziel I made a mistake. I solved it and here is what returns php-wasm/web when I run php.cli( [ 'php', 'composer.phar', 'install' ] ) now :

Capture d’écran 2024-09-03 à 09 14 08

 
 

With [#1093] implementation :

Capture d’écran 2024-09-03 à 14 07 43

 
 

And here is what returns php-wasm/node when I run php.cli( [ 'php', 'composer.phar', 'install' ] ) :

Capture d’écran 2024-09-03 à 09 14 27

 
 

This looks promising for the pull request I think.

@mho22
Copy link
Collaborator Author

mho22 commented Sep 3, 2024

In my quest to correct the errors above I found out other elements to add into the Asyncify functions list :

"Curl_proxy_connect",\ "call_extract_if_dead",\ "Curl_conncache_foreach",\ 

Should I update the current pull request ?

@adamziel
Copy link
Collaborator

adamziel commented Sep 6, 2024

Should I update the current pull request ?

Yes please, especially since we've had another .wasm updating PR merged in the meantime and there are wasm merge conflicts.

@adamziel adamziel added [Type] Bug An existing feature does not function as intended [Package][@php-wasm] Web [Package][@php-wasm] Node labels Sep 6, 2024
@mho22 mho22 requested a review from a team as a code owner September 8, 2024 09:51
@mho22
Copy link
Collaborator Author

mho22 commented Sep 8, 2024

@adamziel done 👌

Copy link
Collaborator

@adamziel adamziel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM although GitHub still shows merge conflicts

@mho22
Copy link
Collaborator Author

mho22 commented Sep 10, 2024

@adamziel My apologies. The conflicts have been resolved. But test-e2e and build failed?

@adamziel adamziel merged commit 4283089 into WordPress:trunk Sep 11, 2024
5 checks passed
@adamziel
Copy link
Collaborator

It seems like they passed after rebasing. Thank you @mho22!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package][@php-wasm] Node [Package][@php-wasm] Web [Type] Bug An existing feature does not function as intended

2 participants