Skip to content

"command did not execute successfully" message is too verbose when tool fails to compile #122706

Closed
@Noratrieb

Description

@Noratrieb

When making a tool (like tidy) not compile, I get the following error:

<snip full rustc error>
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `tidy` (lib) due to 82 previous errors


command did not execute successfully: cd "/home/nils/projects/rust2" && env -u MAKEFLAGS -u MFLAGS AR_x86_64_unknown_linux_gnu="ar" CARGO_INCREMENTAL="1" CARGO_PROFILE_RELEASE_DEBUG="1" CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="true" CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="true" CARGO_PROFILE_RELEASE_STRIP="false" CARGO_TARGET_DIR="/home/nils/projects/rust2/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools" CC_x86_64_unknown_linux_gnu="gcc" CFG_COMPILER_BUILD_TRIPLE="x86_64-unknown-linux-gnu" CFG_COMPILER_HOST_TRIPLE="x86_64-unknown-linux-gnu" CFG_RELEASE="1.79.0-dev" CFG_RELEASE_CHANNEL="dev" CFG_RELEASE_NUM="1.79.0" CFG_VERSION="1.79.0-dev (\u{1b}[1m\u{1b}[35m💕 i love you 😳🥺\u{1b}[0m)" CFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXXFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXX_x86_64_unknown_linux_gnu="g++" DOC_RUST_LANG_ORG_CHANNEL="https://doc.rust-lang.org/nightly" LIBC_CHECK_CFG="1" LZMA_API_STATIC="1" RANLIB_x86_64_unknown_linux_gnu="ar s" REAL_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" RUSTBUILD_NATIVE_DIR="/home/nils/projects/rust2/build/x86_64-unknown-linux-gnu/native" RUSTC="/home/nils/projects/rust2/build/bootstrap/debug/rustc" RUSTC_ALLOW_FEATURES="binary-dep-depinfo,proc_macro_span,proc_macro_span_shrink,proc_macro_diagnostic" RUSTC_BACKTRACE_ON_ICE="1" RUSTC_BOOTSTRAP="1" RUSTC_BREAK_ON_ICE="1" RUSTC_ERROR_METADATA_DST="/home/nils/projects/rust2/build/tmp/extended-error-metadata" RUSTC_HOST_FLAGS="--cfg=bootstrap -Zunstable-options --check-cfg=cfg(bootstrap) -Clink-arg=-fuse-ld=lld" RUSTC_INSTALL_BINDIR="bin" RUSTC_LIBDIR="/home/nils/projects/rust2/build/x86_64-unknown-linux-gnu/stage0/lib" RUSTC_LINT_FLAGS="-Wrust_2018_idioms -Wunused_lifetimes" RUSTC_REAL="/home/nils/projects/rust2/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" RUSTC_SNAPSHOT="/home/nils/projects/rust2/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" RUSTC_SNAPSHOT_LIBDIR="/home/nils/projects/rust2/build/x86_64-unknown-linux-gnu/stage0/lib" RUSTC_STAGE="0" RUSTC_SYSROOT="/home/nils/projects/rust2/build/x86_64-unknown-linux-gnu/stage0" RUSTC_TLS_MODEL_INITIAL_EXEC="1" RUSTC_VERBOSE="0" RUSTC_WRAPPER="/home/nils/projects/rust2/build/bootstrap/debug/rustc" RUSTDOC="/home/nils/projects/rust2/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=bootstrap -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) -Wrustdoc::invalid_codeblock_attributes --crate-version 1.79.0-dev\t(\u{1b}[1m\u{1b}[35m💕\ti\tlove\tyou\t😳🥺\u{1b}[0m) -Clink-arg=-fuse-ld=lld" RUSTDOC_REAL="/path/to/nowhere/rustdoc/not/required" RUSTFLAGS="--cfg=bootstrap -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) -Zmacro-backtrace -Csplit-debuginfo=off -Cforce-frame-pointers=true -Cllvm-args=-import-instr-limit=10 -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,$ORIGIN/../lib -Clink-arg=-fuse-ld=lld -Zunstable-options" RUST_TEST_THREADS="32" SYSROOT="/home/nils/projects/rust2/build/x86_64-unknown-linux-gnu/stage0-sysroot" __CARGO_DEFAULT_LIB_METADATA="bootstrap" "/home/nils/projects/rust2/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "-Zcheck-cfg" "-Zbinary-dep-depinfo" "-j" "32" "--manifest-path" "/home/nils/projects/rust2/src/tools/tidy/Cargo.toml"
expected success, got: exit status: 101

stdout ----

stderr ----



Build completed unsuccessfully in 0:00:00
aww, you'll get it next time~

This is way too verbose, I do not care about the environment variables and all of these useless empty lines at the end. It obscures the rustc error, especially in a terminal without much scollback like the default VSCode one at the bottom. This information should only be shown when using -v.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions