Skip to content

Add -Z proc-macro-backtrace to allow showing proc-macro panics #75082

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

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

Aaron1011
Copy link
Member

Fixes #75050

Previously, we would unconditionally suppress the panic hook during
proc-macro execution. This commit adds a new flag
-Z proc-macro-backtrace, which allows running the panic hook for
easier debugging.

@rust-highfive
Copy link
Contributor

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 3, 2020
@Aaron1011 Aaron1011 force-pushed the feature/proc-macro-backtrace branch 2 times, most recently from 9acdad1 to 87422ef Compare August 3, 2020 17:36
@petrochenkov
Copy link
Contributor

(I'll review this next weekend.)

@petrochenkov
Copy link
Contributor

I'll review this next weekend.
I'm not sure this is something that needs to be done, or at least the priority is not high.

@bors
Copy link
Collaborator

bors commented Aug 30, 2020

☔ The latest upstream changes (presumably #74862) made this pull request unmergeable. Please resolve the merge conflicts.

@petrochenkov
Copy link
Contributor

r=me after rebase

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 30, 2020
Fixes rust-lang#75050

Previously, we would unconditionally suppress the panic hook during
proc-macro execution. This commit adds a new flag
-Z proc-macro-backtrace, which allows running the panic hook for
easier debugging.
@Aaron1011 Aaron1011 force-pushed the feature/proc-macro-backtrace branch from 87422ef to d920866 Compare August 31, 2020 02:18
@Aaron1011
Copy link
Member Author

@bors r=petrochenkov

@bors
Copy link
Collaborator

bors commented Aug 31, 2020

📌 Commit d920866 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 31, 2020
@bors
Copy link
Collaborator

bors commented Aug 31, 2020

⌛ Testing commit d920866 with merge e98f063...

@bors
Copy link
Collaborator

bors commented Aug 31, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: petrochenkov
Pushing e98f063 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 31, 2020
@bors bors merged commit e98f063 into rust-lang:master Aug 31, 2020
@rust-log-analyzer
Copy link
Collaborator

Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

bors bot added a commit to rust-lang/rust-analyzer that referenced this pull request Dec 27, 2020
7047: Add force_show_panics flag for proc-macro bridge r=jonas-schievink a=edwin0cheng

rust-lang/rust#75082 and rust-lang/rust#76292 added a new flag in `proc_macro::Bridge` such that the ABI was changed. These ABI changing are the reason of some weird panics which caused #6880 and maybe related to the panic mentioned in #6820.

These changes are landed on rust stable 1.48 so I think it is okay to apply it now.

fixes #6880

r @jonas-schievink 


Co-authored-by: Edwin Cheng <[email protected]>
@cuviper cuviper added this to the 1.48.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow showing backtraces from proc-macro panics
6 participants