-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Export wasm source map when debug information is enabled #47883
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @michaelwoerister (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Nice! I think Travis is failing b/c of the use of "TODO" (we have a lint that says to use "FIXME" instead), but other than that this looks great to me. I think we may want to follow this up with a patch to Cargo as well around here so Cargo knows about the |
dd456ee
to
0a83d5b
Compare
@bors: r+ |
📌 Commit 0a83d5b has been approved by |
@bors: r- er actually lemme leave a comment |
src/librustc_trans/back/write.rs
Outdated
fs::write(&object, binary.data()) | ||
let result = fs::write(&object, binary.data()); | ||
if cgcx.debuginfo != config::NoDebugInfo { | ||
fs::write(map, binary.source_map()).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of .unwrap()
here could this use .and_then
or other sorts of error handling?
We use binaryen's linker to produce a wasm file (via s2wasm). The wasm writer has capabilities to export source maps. The produced source map contains references to the original file, that might require additional source map file processing to include / package original files with it.
0a83d5b
to
cfe53c0
Compare
@alexcrichton the PR author should have fixed your concerns, could you review this? |
@bors: r+ Indeed1 @yurydelendik feel free to ping when a PR is updated, unfortunately no notifications are sent out for that :( |
📌 Commit cfe53c0 has been approved by |
Export wasm source map when debug information is enabled We use binaryen's linker to produce a wasm file (via s2wasm). The wasm writer has capabilities to export source maps. The pilot support for source maps is added to Firefox. The produced source map contains references to the original file, that might require additional source map file processing to include / package original files with it. /cc @alexcrichton
💔 Test failed - status-appveyor |
@bors retry 3 hour timeout. |
Export wasm source map when debug information is enabled We use binaryen's linker to produce a wasm file (via s2wasm). The wasm writer has capabilities to export source maps. The pilot support for source maps is added to Firefox. The produced source map contains references to the original file, that might require additional source map file processing to include / package original files with it. /cc @alexcrichton
We use binaryen's linker to produce a wasm file (via s2wasm). The wasm writer has capabilities to export source maps. The pilot support for source maps is added to Firefox.
The produced source map contains references to the original file, that might require additional source map file processing to include / package original files with it.
/cc @alexcrichton