Skip to content
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

[Remote] Remove the "light" PHP.wasm bundle and only ship the "kitchen-sink" build #1861

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Oct 8, 2024

Maintaining the "light" PHP.wasm bundle is a burden (#1848), especially with the JSPI support on the horizon (#1339). Only 1.3% of Playgrounds are loaded with the light extension bundle (see #1848).

Let's thus simplify the project maintenance and remove the "light" bundle. After this PR, every Playground will be loaded with the "kitchen-sink" extension bundle. This PR also drops the name "kitchen-sink". From now on, it's just "php",

Developer notes

The web version of Playground at playground.wordpress.net no longer ships the light build of PHP.wasm. Instead, it only ships the kitchen-sink build where popular PHP extensions are available (e.g. libxml, libopenssl). Note that the kitchen-sink build was already used by 98.7% of Playgrounds and most users are not affected by this.

This change will help Playground maintainers focus on a single version and enable solving a lot of PHP.wasm stability issues by migrating to JSPI.

The CLI version of Playground is unaffected by this change.

The following APIs are now deprecated. Playground will accept them without crashing, but they will no longer have any effect:

  • phpExtensionBundles Blueprint setting
  • php-extension-bundle Query API parameter

Follow up work

Testing instructions

  • Confirm Playground continues to work in the local dev env
  • Confirm the CI is green – it would perform a thorough test run of many user flows.

Closes #1848

…sink" one

Maintaining the "light" PHP.wasm bundle is a burden (#1848), especially with the
JSPI support on the horizon (#1339). Only 1.3% of Playgrounds are loaded
with the `light` extension bundle (see #1848).

Let's thus simplify the project maintenance and remove the "light" bundle. After this PR, every Playground will be loaded with the "kitchen-sink" extension bundle.
This PR also drops the name "kitchen-sink". From now on, it's just
"php",

 ## Testing instructions

* Confirm Playground continues to work in the local dev env
* Confirm the CI is green – it would perform a thorough test run of many user flows.

Closes #1848
@adamziel
Copy link
Collaborator Author

adamziel commented Oct 8, 2024

We'll need to remove extensions-related E2E tests, but otherwise the code may be good to go.

@adamziel adamziel changed the title [Remote] Remove the "light" PHP.wasm bundle. Only ship a single bundle – the former "kitchen-sink" one. [Remote] Remove the "light" PHP.wasm bundle and only ship the "kitchen-sink" build Oct 8, 2024
Copy link
Member

@brandonpayton brandonpayton left a comment

Choose a reason for hiding this comment

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

Looks good!

It's cool to see all the code we're able to delete with dropping this option.

*/
phpExtensionBundles?: SupportedPHPExtensionBundle[];
phpExtensionBundles?: any;
Copy link
Member

Choose a reason for hiding this comment

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

This looks fine, but it made me wonder:
Have we ever considered support for dynamically loading specific, optional PHP modules?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup! #89

@adamziel
Copy link
Collaborator Author

adamziel commented Oct 9, 2024

I'll go ahead and merge. With 1.3% usage, deploying a version without the light build might be the only way to find the people using that feature. If they do, and if that's intentional, and if the use-case is really good, let's keep an open mind to backtrack on this change. Otherwise, let's move forward.

@adamziel adamziel merged commit bacc516 into trunk Oct 9, 2024
9 checks passed
@adamziel adamziel deleted the remove-light-bundle branch October 9, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Consider dropping the "light" PHP build
2 participants