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

Alter use of the --verbose flag for fuelup check #631

Merged
merged 18 commits into from
Jun 25, 2024
Merged

Conversation

JoshuaBatty
Copy link
Member

@JoshuaBatty JoshuaBatty commented Jun 18, 2024

The output of fuelup check --verbose is what I would expect fuelup check to output. Before this change, fuelup check outputted a fraction of the installed components on the system. I feel like this just leads to confusion amongst users so it's been removed.

I added the -v flag back in. The default behaviour is to only show fuelup or components need updating. The -v flag shows all components and prints that they are up to date. See screen shot below.

The rest of the diff is just cleaning up imports and doing clippy.

Screenshot 2024-06-25 at 1 59 44 pm

closes #553

@JoshuaBatty JoshuaBatty self-assigned this Jun 18, 2024
@JoshuaBatty JoshuaBatty marked this pull request as draft June 18, 2024 03:43
@JoshuaBatty JoshuaBatty marked this pull request as ready for review June 18, 2024 04:32
@sdankel
Copy link
Member

sdankel commented Jun 18, 2024

I agree that we shouldn't need a verbose flag for fuelup check, but I also think we should condense its output. I think it should show 1 line per installed toolchain when there is nothing to update, rather than showing every plugin in the toolchain, similar to rustup.

When there is an update available, it could show just the plugins that need updating. What do you think?

image

image

Currently it prints a download bar even when everything is up to date. On that note, check should never download anything, it should only tell the user if something can be updated, so that's a bug.

@JoshuaBatty
Copy link
Member Author

Thanks Sophie. I like the idea of mimicking what cargo check does here. I'll also look into avoiding need to download anything for this check. Putting into draft mode until this is finished.

@JoshuaBatty JoshuaBatty marked this pull request as draft June 19, 2024 00:14
@JoshuaBatty JoshuaBatty force-pushed the josh/check branch 2 times, most recently from 9e9fdec to 5b6f6ae Compare June 19, 2024 00:41
@JoshuaBatty JoshuaBatty changed the title Remove unnecessary --verbose flag for fuelup check Alter use of the --verbose flag for fuelup check Jun 19, 2024
@JoshuaBatty
Copy link
Member Author

Thanks @sdankel this should be ready now. I added the -v flag back in so it prints if the component of fuelup is up to date, but the default behaviour is now similar to rustup and only shows if something is out of date.

I also removed the download bar. We still need to download the toml file from git to check the versions but it's only a handful of kb so showing a download bar seems unnecessary.

@JoshuaBatty JoshuaBatty marked this pull request as ready for review June 19, 2024 06:03
Copy link
Member

@sdankel sdankel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking much better! One thing I noticed is when I have 1 toolchain that needs updates and 1 that is up to date, the formatting for the up-to-date one is off, and doesn't say up-to-date:

image

src/ops/fuelup_check.rs Outdated Show resolved Hide resolved
@JoshuaBatty
Copy link
Member Author

JoshuaBatty commented Jun 25, 2024

Thanks @sdankel i've updated the description with a screenshot of what the default and verbose options produce.

@JoshuaBatty JoshuaBatty marked this pull request as ready for review June 25, 2024 04:02
Copy link
Member

@kayagokalp kayagokalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

@fuel-service-user
Copy link
Contributor

LCOV of commit 9bde78c during CI #2025

Summary coverage rate:
  lines......: 81.9% (2315 of 2827 lines)
  functions..: 44.4% (363 of 818 functions)
  branches...: 58.6% (278 of 474 branches)

Files changed coverage rate: n/a

Copy link
Member

@sdankel sdankel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@JoshuaBatty JoshuaBatty merged commit 17e8abb into master Jun 25, 2024
17 checks passed
@JoshuaBatty JoshuaBatty deleted the josh/check branch June 25, 2024 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fuelup check —verbose
4 participants