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

Display progress when compiling dependencies #2536

Closed
rphmeier opened this issue Apr 1, 2016 · 9 comments · Fixed by #5995
Closed

Display progress when compiling dependencies #2536

rphmeier opened this issue Apr 1, 2016 · 9 comments · Fixed by #5995
Labels
A-console-output Area: Terminal output, colors, progress bar, etc. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@rphmeier
Copy link

rphmeier commented Apr 1, 2016

e.g.

[1 / n] Compiling foo v0.0.1
[2 / n] Compiling bar v0.3.5
...

When compiling a crate with a lot of transitive dependencies (which themselves may not be trivial), it would be nice to see about how many crates are left to compile.

@srinivasreddy
Copy link
Contributor

When we compile with concurrent jobs don't we get the order jumbled?

@rphmeier
Copy link
Author

rphmeier commented Apr 1, 2016

An atomic counter could be used to keep a consistent order between threads. I will look into implementing this later today.

@alexcrichton
Copy link
Member

cc rust-lang/rust#24335, specifically rust-lang/rust#24335 (comment).

I'm somewhat wary of doing this because of:

  • There's still no indication what's actually running
  • There's not necessarily a sense of overall progress as it's just the number of rustc commands we're issuing.
  • Calculating how much needs to run may actually be nontrivial in Cargo itself

But that being said, I'd love to see progress here! Ideally we could get some form of hooks into the compiler indicating where it is and we could provide an interactive UI which indicates the progress of compilation (even concurrently), but that may be kinda difficult to implement :(

@carols10cents carols10cents added A-console-output Area: Terminal output, colors, progress bar, etc. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` labels Sep 25, 2017
bors added a commit that referenced this issue Jun 29, 2018
Displays a one line progress of what crates are currently built.

cc #2536, #3448.

The change is based on #3451, but uses the progress bar introduced in #4646 instead. The percentage is simply the number of crates processed ÷ total crates count, which is inaccurate but better than nothing.

Output looks like:
[![asciicast](https://asciinema.org/a/YTiBAz4K4vfidNTAnehtyH46l.png)](https://asciinema.org/a/YTiBAz4K4vfidNTAnehtyH46l)
@nox
Copy link
Contributor

nox commented Aug 2, 2018

Wasn't this implemented with them fancy progress bars?

@mbrubeck
Copy link
Contributor

mbrubeck commented Aug 7, 2018

This was implemented by #5620, disabled by #5698, and re-introduced behind the unstable -Zcompile-progress option in #5716.

kennytm added a commit to kennytm/cargo that referenced this issue Sep 12, 2018
bors added a commit that referenced this issue Sep 12, 2018
@pravic
Copy link

pravic commented Oct 22, 2018

While it's definitely a useful feature, it has some quirks on Windows:

$ cargo +nightly install -f cargo-modules
Updating crates.io index
Downloaded cargo-modules v0.4.3
Downloaded 1 crates (541.8 KB) in 3.02sodules ... // <-- here
Installing cargo-modules v0.4.3
Downloaded structopt v0.2.12

Apparently, there was some message which was not fully erased before been replaced with the "Downloaded 1 crates (541.8 KB) in 3.02s".

Should I open a new issue for that?

@ehuss
Copy link
Contributor

ehuss commented Oct 22, 2018

@pravic I'm able to reproduce, I can take a look. It's not windows-specific. Thanks!

@dwijnand
Copy link
Member

@pravic fixed in #6206

@pravic
Copy link

pravic commented Oct 25, 2018

@ehuss Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-console-output Area: Terminal output, colors, progress bar, etc. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants