Skip to content
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

Let user see the full type of type-length limit error #76843

Merged
merged 1 commit into from
Sep 21, 2020

Conversation

kornelski
Copy link
Contributor

Seeing the full type of the error is sometimes essential to diagnosing the problem, but the type itself is too long to be displayed in the terminal in a useful fashion. This change solves this dilemma by writing the full offending type name to a file, and displays this filename as a note.

note: the full type name been written to '$TEST_BUILD_DIR/issues/issue-22638/issue-22638.long-type.txt'

Closes #76777

@rust-highfive
Copy link
Collaborator

r? @ecstatic-morse

(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 Sep 17, 2020
Copy link
Contributor

@ecstatic-morse ecstatic-morse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Writing a file as part of diagnostics is novel AFAICT, but seems like the right thing to do in this case. One question, will cargo clean remove this?

compiler/rustc_mir/src/monomorphize/collector.rs Outdated Show resolved Hide resolved
@kornelski
Copy link
Contributor Author

kornelski commented Sep 17, 2020

The path is chosen by an existing function for temp files (it's very handy that rustc already has that), and cargo clean does clean it properly.

@ecstatic-morse
Copy link
Contributor

ecstatic-morse commented Sep 17, 2020

@bors delegate+ rollup

r=me with or without suggestion and with tests passing.

@bors
Copy link
Contributor

bors commented Sep 17, 2020

✌️ @kornelski can now approve this pull request

@rust-lang rust-lang deleted a comment from bors Sep 17, 2020
@kornelski
Copy link
Contributor Author

@bors r+

@bors
Copy link
Contributor

bors commented Sep 17, 2020

📌 Commit 677c6fcfe47471614abc2f6aed0e9e16cbda0790 has been approved by kornelski

@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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 17, 2020
@bors
Copy link
Contributor

bors commented Sep 18, 2020

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

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 18, 2020
@kornelski
Copy link
Contributor Author

@bors r+

@bors
Copy link
Contributor

bors commented Sep 20, 2020

📌 Commit c5968e8 has been approved by kornelski

@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 Sep 20, 2020
@ecstatic-morse
Copy link
Contributor

@bors r- r=ecstatic-morse

@kornelski please use the name of the reviewer when delegated to.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 20, 2020
@bors
Copy link
Contributor

bors commented Sep 20, 2020

📌 Commit c5968e8 has been approved by ecstatic-morse

@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 Sep 20, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request Sep 20, 2020
…c-morse

Let user see the full type of type-length limit error

Seeing the full type of the error is sometimes essential to diagnosing the problem, but the type itself is too long to be displayed in the terminal in a useful fashion. This change solves this dilemma by writing the full offending type name to a file, and displays this filename as a note.

> note: the full type name been written to '$TEST_BUILD_DIR/issues/issue-22638/issue-22638.long-type.txt'

Closes rust-lang#76777
@RalfJung
Copy link
Member

Failed in #76957 (comment)
@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 20, 2020
@kornelski
Copy link
Contributor Author

build path normalization doesn't cover nll tests. I've added explicit normalization for them.

@RalfJung
Copy link
Member

@bors r=ecstatic-morse rollup=iffy

@bors
Copy link
Contributor

bors commented Sep 21, 2020

📌 Commit 34d3c7d has been approved by ecstatic-morse

@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 Sep 21, 2020
@bors
Copy link
Contributor

bors commented Sep 21, 2020

⌛ Testing commit 34d3c7d with merge 0433fdf...

@bors
Copy link
Contributor

bors commented Sep 21, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: ecstatic-morse
Pushing 0433fdf to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 21, 2020
@bors bors merged commit 0433fdf into rust-lang:master Sep 21, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 21, 2020
@kornelski kornelski deleted the longtypetofile branch September 21, 2020 19:31
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.

None yet

6 participants