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

1.39 error messages don't properly truncate, making autogenerated files (e.g. bindgen) spam the terminal #66229

Closed
q66 opened this issue Nov 8, 2019 · 6 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@q66
Copy link

q66 commented Nov 8, 2019

A paste is worth a thousand words, even if it has many thousands of words itself: https://gist.githubusercontent.com/q66/7004995a784b59475134a290512cf545/raw/a42c4af7648c142175c5244494f74d30dfe1b340/gistfile1.txt

@q66 q66 changed the title 1.39 error messages dump seemingly entire source file where the affected line should be 1.39 error messages don't properly truncate, making autogenerated files (e.g. bindgen) spam the terminal Nov 8, 2019
@q66
Copy link
Author

q66 commented Nov 8, 2019

Actually, the source file appears to be one line. It's generated by rust-bindgen.

@q66
Copy link
Author

q66 commented Nov 8, 2019

@estebank
Copy link
Contributor

estebank commented Nov 8, 2019

#63402 implements the feature, but it needs to be integrated with cargo.

@estebank estebank added C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-diagnostics Area: Messages for errors, warnings, and lints labels Nov 8, 2019
@est31
Copy link
Member

est31 commented Nov 9, 2019

See also the bindgen bug: rust-lang/rust-bindgen#1600

I've added some pretty-printing code to my own project: RustAudio/deepspeech-rs@3323b0e

Optimally it would live in bindgen though. Want to port it to bindgen, @q66 ?

@q66
Copy link
Author

q66 commented Nov 9, 2019

no thanks, i have enough of my own work and prefer to touch this kinda stuff as little as possible. For now, I took patches from Gentoo to fix compilation of firefox/thunderbird (and adapted it for other stuff so that e.g. icecat can also build), which seems to work ok.

@estebank
Copy link
Contributor

I believe all of the work necessary here has been completed. Extremely long types in messages are now truncated and written to disk, and cargo passes through the terminal's width to rustc to truncate the code window in diagnostics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants