You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix php-wasm build error for WITH_SOURCEMAPS=yes (#44)
## Motivation for the change, related issues
Building php-wasm with WITH_SOURCEMAPS=yes is currently broken. When
WITH_SOURCEMAPS is enabled, it turns out Emscripten is generating JS
that uses single quotes rather than double-quotes. I guess this has to
do with the difference in optimization options but have not tested it.
## Implementation details
This PR fixes the build so there is no longer an error by expanding the
php-wasm JS replacement regexes to match on either single or double
quotes. I have not tested actually debugging with sourcemaps, but this
fixes the build error.
Once this is fixed I plan add a build arg for compiling php-wasm with
DWARF debug info so we [can step-through-debug the PHP runtime in
Chrome](https://developer.chrome.com/docs/devtools/wasm) with access to
variable values.
## Testing Instructions (or ideally a Blueprint)
Run the following command on trunk and on this branch, and note that it
fails on trunk and succeeds on this branch.
```
npx nx recompile-php:asyncify php-wasm-web -- --PHP_VERSION=8.4 --WITH_SOURCEMAPS=yes
```
0 commit comments