Skip to content

#3827 has broken the ETA format when downloading/installing components #3828

Closed

Description

@rami3l

@djc Just tried the latest build and this looks incorrect.

image

Originally posted by @rami3l in #3827 (comment)

This regression has been discovered in the following version:

> rustup --version
rustup 1.27.1 :: 1.27.0+133 (eca50133c 2024-05-15)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.78.0 (9b00956e5 2024-04-29)`

Activity

  1. rami3l commented on May 15, 2024

    @rami3l
    MemberAuthor

    Suggestion: we should stick to the old format:

    format!(
    "{} / {} ({:3.0} %) {} in {} ETA: {}",
    total_h,
    content_len_h,
    percent,
    speed_h,
    elapsed_h.display(),
    eta_h.display(),
    )

    ... which means there should be an ETA: {} somewhere.

    My suggestion write!(f, " ETA: {}", self.0.display()), in #3827 (comment) should do exactly this.

  2. djc commented on May 15, 2024

    @djc
    Contributor

    Why should we stick to the old format? I agree with #3826 that showing it after finishing is pointless.

  3. rami3l commented on May 15, 2024

    @rami3l
    MemberAuthor

    Why should we stick to the old format? I agree with #3826 that showing it after finishing is pointless.

    @djc Sorry, I meant stick to the old format when downloading. The expected result should be something like in 1s ETA: Unknown.

  4. rami3l commented on May 15, 2024

    @rami3l
    MemberAuthor

    For example if ETA is 3s, the current version will print in 1s3s, which is clearly not ideal.

  5. djc commented on May 15, 2024

    @djc
    Contributor

    Ahh, no, I only applied half of your suggestion -- sorry, was too hasty; fix in #3829.

    I was confused for a while by your screenshot showing "Unknown", but that seems unrelated.

  6. rami3l commented on May 15, 2024

    @rami3l
    MemberAuthor

    Ahh, no, I only applied half of your suggestion -- sorry, was too hasty; fix in #3829.

    I was confused for a while by your screenshot showing "Unknown", but that seems unrelated.

    @djc Sorry, that Unknown is caused by a division-by-zero I believe. I probably won't be able to make a better screenshot: it all goes too fast on my machine :]

  7. djc commented on May 15, 2024

    @djc
    Contributor

    All of this code looks pretty shitty and would like to use indicatif instead (#1835), but that'll have to wait for another day.

  8. rami3l commented on May 15, 2024

    @rami3l
    MemberAuthor

    All of this code looks pretty shitty and would like to use indicatif instead (#1835), but that'll have to wait for another day.

    @djc I'm also in favor of using the console suite (incl. dialoguer and indicatif). In #3803 however I tried my best not to introduce new dependencies 😅

  9. djc commented on May 15, 2024

    @djc
    Contributor

    Yeah, one step at a time. async -> tracing -> indicatif.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions