-
Notifications
You must be signed in to change notification settings - Fork 777
wasm-emscripten-finalize doesn't preserve sourcesContent #6805
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
Thanks @mkl-ableton for pinging on this. |
This is in preparation for fixing #6805. Aside from cleaning up and reusing more code, it allows optional fields in the source map and random access to those fields, rather than walking through the whole JSON file just once. (It does keep the current behavior of walking through the actual mappings in a single pass synchronized with reading the binary). It also adds some unit tests.
This is in preparation for fixing #6805. Aside from cleaning up and reusing more code, it allows optional fields in the source map and random access to those fields, rather than walking through the whole JSON file just once. (It does keep the current behavior of walking through the actual mappings in a single pass synchronized with reading the binary). It also adds some unit tests.
Read the "sourcesContent", "file", and "sourceRoot" fields from incoming source maps, attach them to the wasm IR module, and write them back to the output source map. These fields are unchanged by Binaryen's updates to the mappings, so they do not need to be decoded or interpreted. Fixes #6805
Read the "sourcesContent", "file", and "sourceRoot" fields from incoming source maps, attach them to the wasm IR module, and write them back to the output source map. These fields are unchanged by Binaryen's updates to the mappings, so they do not need to be decoded or interpreted. Fixes #6805
If you can't host the files for your source map, you can put their contents in the
sourcesContent
field of your source map JSON file https://tc39.es/source-map/#sourcescontentWhen emscripten runs wasm-emscripten-finalize on a source map file that has that field set
https://github.com/emscripten-core/emscripten/blob/cf0ec7a4426203d76f958216d14ad9f4513d8481/tools/emscripten.py#L488-L491
wasm-emscripten-finalize removes it.
emscripten-core/emscripten#22190
The text was updated successfully, but these errors were encountered: