-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Deprecate --keep-debug
flag
#3876
base: main
Are you sure you want to change the base?
Conversation
Interesting, I didn't know that history.
I didn't think debug info affected stack traces. At least at a first glance, browsers only seem to use the It should still be useful for actually debugging, though.
Yeah, this probably won't be getting included in a wasm-bindgen release until after that point anyway. |
Strange, it does improve the stack trace for me significantly. |
dc6d2ba
to
19a6b59
Compare
So after some digging, I found that The main worry here is that I will update the PR when that happens. |
You are right, I had the C/C++ DevTools Support extension enabled, which is why I was getting better stacktraces. |
7d18d91
to
fa40da3
Compare
Apparently WDYT @Liamolucko. |
I'm unsure why |
e553cc5
to
7d595f7
Compare
7d595f7
to
f98630a
Compare
The issue was actually quite simple: Walrus generated empty custom sections even if no debugging information was available. I made a fix in rustwasm/walrus#284. |
Debug information is already controlled by Rustc/Cargo, but the reason this flag was introduced is to control debug information coming from the pre-compiled Std libraries, see #466.
This can now be done by the user instead in Cargo with the
strip
option, which is available since v1.59 (or directly with Rustc-C strip
since v1.58).Additionally, this will require no user action at all when v1.77 releases, which will strip Std's debug information automatically when no debug information is requested (e.g. the release profile), see rust-lang/cargo#13257.
This should significantly improve the stacktraces with the downside of significantly increased Wasm file sizes in release mode for users who don't strip debug information or are using Cargo versions below v1.77.
We might want to hold off merging this until Rust v1.77 release, which would be 21th March, but considering how close this is (13 days) I think its alright.
See #3483, which made this finally possible.
See #3698 for tracking other debug information related improvements.
Blocked on rustwasm/walrus#284 and a new Walrus release.