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

Rustup-Init displays ETA with lots of decimal places #1696

Closed
nikonthethird opened this issue Mar 8, 2019 · 4 comments · Fixed by #1699
Closed

Rustup-Init displays ETA with lots of decimal places #1696

nikonthethird opened this issue Mar 8, 2019 · 4 comments · Fixed by #1699
Labels

Comments

@nikonthethird
Copy link

Problem

I installed Rust 1.33 using Rustup-Init.exe on Windows 10 (in a Powershell window), and the ETA while installing displayed many decimal places that can be seen below. (See the last line of the picture).

Rustup_Time

Steps

  1. Download Rustup-Init
  2. Install Rust
  3. Look at the ETA during installation

Notes

Output of rustup-init --version: rustup-init 1.17.0 (069c88e 2019-03-05)

@kinnison
Copy link
Contributor

kinnison commented Mar 9, 2019

Interesting, I thought we'd merged some code to improve matters here. Thank you for this report.

@kinnison
Copy link
Contributor

kinnison commented Mar 9, 2019

@Manishearth Could this be related to the work you did for #1547 ?

@Manishearth
Copy link
Member

Yeah some of the things there need to be casted to integers. I'll make a patch.

@Manishearth
Copy link
Member

#1699

Manishearth added a commit to Manishearth/rustup.rs that referenced this issue Mar 9, 2019
tesuji pushed a commit to tesuji/rustup that referenced this issue Apr 21, 2019
The workaround here that was printing many spaces did not work properly
if the line length got very long and then very short again. I noticed
this problem on an old version of rustup that still suffered from rust-lang#1696,
so it might not technically be reproducible anymore, but I figured we
might as well fix this for the future anyway!

I suspect the comment saying `delete_line()` didn't clear the line
properly was attempting to call it *after* printing the current download
progress, but the `term` crate docs say it deletes from the cursor
position to the end of the line.

To deal with that, we instead jump to the start of the line *before*
printing the current download progress and call `delete_line()` there.
tesuji pushed a commit to tesuji/rustup that referenced this issue Apr 21, 2019
The workaround here that was printing many spaces did not work properly
if the line length got very long and then very short again. I noticed
this problem on an old version of rustup that still suffered from rust-lang#1696,
so it might not technically be reproducible anymore, but I figured we
might as well fix this for the future anyway!

I suspect the comment saying `delete_line()` didn't clear the line
properly was attempting to call it *after* printing the current download
progress, but the `term` crate docs say it deletes from the cursor
position to the end of the line.

To deal with that, we instead jump to the start of the line *before*
printing the current download progress and call `delete_line()` there.
tesuji pushed a commit to tesuji/rustup that referenced this issue Apr 21, 2019
The workaround here that was printing many spaces did not work properly
if the line length got very long and then very short again. I noticed
this problem on an old version of rustup that still suffered from rust-lang#1696,
so it might not technically be reproducible anymore, but I figured we
might as well fix this for the future anyway!

I suspect the comment saying `delete_line()` didn't clear the line
properly was attempting to call it *after* printing the current download
progress, but the `term` crate docs say it deletes from the cursor
position to the end of the line.

To deal with that, we instead jump to the start of the line *before*
printing the current download progress and call `delete_line()` there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants