Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
kornelski:longtypetofile
Sep 21, 2020
Merged

Let user see the full type of type-length limit error#76843
bors merged 1 commit into
rust-lang:masterfrom
kornelski:longtypetofile

Conversation

@kornelski

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@ecstatic-morse ecstatic-morse left a comment

Copy link
Copy Markdown
Contributor

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?

Comment thread compiler/rustc_mir/src/monomorphize/collector.rs Outdated
@kornelski

kornelski commented Sep 17, 2020

Copy link
Copy Markdown
Contributor Author

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.

Comment thread compiler/rustc_mir/src/monomorphize/collector.rs Outdated
@ecstatic-morse

ecstatic-morse commented Sep 17, 2020

Copy link
Copy Markdown
Contributor

@bors delegate+ rollup

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

@bors

bors commented Sep 17, 2020

Copy link
Copy Markdown
Collaborator

✌️ @kornelski can now approve this pull request

@rust-lang rust-lang deleted a comment from bors Sep 17, 2020
@kornelski

Copy link
Copy Markdown
Contributor Author

@bors r+

@bors

bors commented Sep 17, 2020

Copy link
Copy Markdown
Collaborator

📌 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

bors commented Sep 18, 2020

Copy link
Copy Markdown
Collaborator

☔ 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
Copy Markdown
Contributor Author

@bors r+

@bors

bors commented Sep 20, 2020

Copy link
Copy Markdown
Collaborator

📌 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
Copy Markdown
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

bors commented Sep 20, 2020

Copy link
Copy Markdown
Collaborator

📌 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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@RalfJung

Copy link
Copy Markdown
Member

@bors r=ecstatic-morse rollup=iffy

@bors

bors commented Sep 21, 2020

Copy link
Copy Markdown
Collaborator

📌 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

bors commented Sep 21, 2020

Copy link
Copy Markdown
Collaborator

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

@bors

bors commented Sep 21, 2020

Copy link
Copy Markdown
Collaborator

☀️ 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.

6 participants