Skip to content

Cargo prints "Compiling <crate>" when build script runs, and gives no indication when the final crate artefact is being built #833

Closed as not planned
@huonw

Description

@huonw
[package]

name = "a"
version = "0.0.1"
authors = []
build = "build.rs"

[dependencies.compile_msg]
git = "https://github.com/huonw/compile_msg"
// build.rs
fn main() {}
// src/main.rs
fn main() { println!("hi") }
$ cargo clean && cargo build
   Compiling a v0.0.1 (file:///home/huon/projects/test-rust/tmp/a)
   Compiling compile_msg v0.1.0 (https://github.com/huonw/compile_msg#569c6f18)
$ ./target/a # it worked!
hi

Without the build = ... line the output of cargo build is

   Compiling compile_msg v0.1.0 (https://github.com/huonw/compile_msg#569c6f18)
   Compiling a v0.0.1 (file:///home/huon/projects/test-rust/tmp/a)

I was expecting something like

   Compiling build command a v0.0.1 (file:///home/huon/projects/test-rust/tmp/a)
   Compiling compile_msg v0.1.0 (https://github.com/huonw/compile_msg#569c6f18)
   Compiling a v0.0.1 (file:///home/huon/projects/test-rust/tmp/a)

(Possibly renaming the first line to Executing build command ... or even having a separate line for when it is executed.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-console-outputArea: Terminal output, colors, progress bar, etc.A-diagnosticsArea: Error and warning messages generated by Cargo itself.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions