Skip to content

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

Closed
@glandium

Description

@glandium

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions