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

rustc should "ellipsis" very long lines when printing warnings #62999

Closed
glandium opened this issue Jul 26, 2019 · 1 comment · Fixed by #63402
Closed

rustc should "ellipsis" very long lines when printing warnings #62999

glandium opened this issue Jul 26, 2019 · 1 comment · Fixed by #63402
Labels
A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@glandium
Copy link
Contributor

STR on macOS:

  • Clone https://github.com/RustAudio/coreaudio-sys
  • Checkout commit 13a32d718647b9e5be1defdef8197958cfda31fa
  • Edit Cargo.toml to update the bindgen dependency from 0.42 to 0.49.
  • cargo build
  • Admire the 200MB of warnings scrolling in your terminal for ~800 actual lines of output.

The longest line is 1.4MB. On a 80-columns terminal that's > 17K lines of terminal output just for that one line.

There are two kinds of warnings, one reasonably-sized, because they're on short #[link] attribute lines, and one where each corresponding line of source is one of those crazy long, bindgen-generated, ones.

They look like:

warning: `extern` block uses type `u128` which is not FFI-safe: 128-bit integers don't currently have a known stable ABI
 --> /tmp/coreaudio-sys/target/x86_64-apple-darwin/debug/build/coreaudio-sys-0d8fd082e359c2ec/out/coreaudio.rs:9:210358
  |
9 | ..... 1.4MB line
  | .... 210K whitespaces ^^^^
  |
  = note: #[warn(improper_ctypes)] on by default

So what each warning is really doing is pointing at 4 characters inside the 1.4MB line. All warnings are about the same line, by the way. All are for different offsets.

glandium added a commit to glandium/coreaudio-sys that referenced this issue Jul 26, 2019
Because recent versions of bindgen generate their bindings on one line,
because of bindgen's use of u128 and rust's warnings of its unsafety
FFI-wise, and because of rust-lang/rust#62999,
combined, building the crate generates massive logs... which exceed
travis's maximum log length.

It was disabled in RustAudio#13 because back then rustfmt had some problems with
the bindgen output. Now that rustfmt is part of rust, these kind of
problems presumably should happen less if at all.
glandium added a commit to glandium/coreaudio-sys that referenced this issue Jul 26, 2019
Because recent versions of bindgen generate their bindings on one line,
because of bindgen's use of u128 and rust's warnings of its unsafety
FFI-wise, and because of rust-lang/rust#62999,
combined, building the crate generates massive logs... which exceed
travis's maximum log length.

It was disabled in RustAudio#13 because back then rustfmt had some problems with
the bindgen output. Now that rustfmt is part of rust, these kind of
problems presumably should happen less if at all.
@estebank estebank added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 26, 2019
glandium added a commit to glandium/coreaudio-sys that referenced this issue Aug 6, 2019
Because recent versions of bindgen generate their bindings on one line,
because of bindgen's use of u128 and rust's warnings of its unsafety
FFI-wise, and because of rust-lang/rust#62999,
combined, building the crate generates massive logs... which exceed
travis's maximum log length.

It was disabled in RustAudio#13 because back then rustfmt had some problems with
the bindgen output. Now that rustfmt is part of rust, these kind of
problems presumably should happen less if at all.
@estebank
Copy link
Contributor

estebank commented Aug 9, 2019

Work in progress in #63402:

Screen Shot 2019-08-08 at 11 17 09 PM

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 T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants