-
Notifications
You must be signed in to change notification settings - Fork 104
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
Enable tracebacks with line numbers by default #2412
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eb2bc86
to
44d9464
Compare
- Remove caching decorator since it's hard to read. - Allow specifying pre-build and cache invalidation commands. - Store commands in results file for easier inspection of results. - Abort experiment if commands fail.
The customizations remove tracebacks and do not significantly speed up compiliaton times during development in this repo. I will share an experiment run in the PR comments.
It's not quite clear if this reduces memory usage or not but since we strip debuginfo anyway I don't think we lose anything.
I think this will useful for debugging OOM issue on the CI because we can go back to previous runs and look at differences.
This enables full tracebacks with line-numbers. If it fails maybe we'll learn something thanks to the memory profiling we have now.
The script was useful but I think it could be simplified a lot by using env vars like - CARGO_PROFILE_<name>_SPLIT_DEBUGINFO - CARGO_PROFILE_<name>_DEBUG - CARGO_PROFILE_<name>_LTO instead of editing the Cargo.toml file. At this point I don't want to rewrite and I don't think anyone else is going to use.
imabdulbasit
approved these changes
Mar 4, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
dev
profileDocs on cargo profiles: https://doc.rust-lang.org/cargo/reference/profiles.html#debug
Find some tradeoffs for how long compilation takes and how convenient it is to spot issues. Ideally we would have all debug info and the fastest compilation times but that's not possible.
For the CI we definitely don't need debuggers to work but it would be nice to have tracebacks because it's very time consuming to re-run it with a different profile. For local development we should IMO have tracebacks enabled by default for running tests and running the demo. Maybe it should also be possible to attach a debugger without having to re-compile after running tests.
In order to get any meaningful tracebacks we need at least
debug = line-tables-only
andstrip = debuginfo
. This gives tracebacks that don't include line numbers except the place in the code where the panic occured. I think this is whatrelease
does by default.In order to get tracebacks with all files and line numbers we need
strip = "none"
Code I used for this is