Skip to content

bootstrap: t macro supresses real line number #137557

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

Closed
lolbinarycat opened this issue Feb 24, 2025 · 2 comments · Fixed by #140636
Closed

bootstrap: t macro supresses real line number #137557

lolbinarycat opened this issue Feb 24, 2025 · 2 comments · Fixed by #140636
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@lolbinarycat
Copy link
Contributor

Summary

panics originating from the t macro will show ./src/bootstrap/src/utils/helpers.rs:38:23 in their backtrace, rather than the actual line number,

this is somewhat mitigated by it stringifying the argument expression, but could be further offset via use of the line! macro.

@lolbinarycat lolbinarycat added C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 24, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 24, 2025
@lolbinarycat lolbinarycat added C-enhancement Category: An issue proposing an enhancement or a PR with one. and removed C-bug Category: This is a bug. labels Feb 24, 2025
@lolbinarycat
Copy link
Contributor Author

(as for the actual error i encountered, it was just a spurious corrupted tarball)

@onur-ozkan
Copy link
Member

Yeah, that's being very confusing lately. Thanks for reporting.

@onur-ozkan onur-ozkan removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 24, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue May 5, 2025
…ro, r=Kobzol

implement `PanicTracker` to track `t` panics

Trying to understand panics triggered by `t` macro is very exhausting (especially on CI failures) because it doesn't provide any information about where the macro was originally invoked. This change adds that missing information when an inner call inside the `t` macro panics.

Resolves rust-lang#137557
@bors bors closed this as completed in 6cee5bf May 6, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 6, 2025
Rollup merge of rust-lang#140636 - onur-ozkan:panic-tracker-for-t-macro, r=Kobzol

implement `PanicTracker` to track `t` panics

Trying to understand panics triggered by `t` macro is very exhausting (especially on CI failures) because it doesn't provide any information about where the macro was originally invoked. This change adds that missing information when an inner call inside the `t` macro panics.

Resolves rust-lang#137557
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants