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

fuelup check #64

Merged
merged 168 commits into from
Jun 22, 2022
Merged

fuelup check #64

merged 168 commits into from
Jun 22, 2022

Conversation

eightfilms
Copy link
Contributor

@eightfilms eightfilms commented Jun 7, 2022

Closes #16
(note: this merges into #62)

Now that we have DownloadCfg in #62 it's much easier to support fuelup check, since all we need to do is to build the cfg and compare it with the current version running on the machine.

Usage

$ fuelup check
forc - update available: v0.14.5 -> v0.15.1
fuel-core - up to date: v0.8.0
fuelup - up to date: v0.1.2

There is definitely a more elegant way of handling checks - i.e. we shouldn't panic on each command but simply collect the results and print it all at the end. For example, if fuel-core was not installed, fuelup check would panic, but ideally it should do something like this:

Have since updated this PR by not panicking if the component cannot be found/run, instead showing a not found message. I was wondering if there should be an action message here i.e. if any of forc, forc-fmt, forc-explore, or forc-lsp are missing or outdated, should we add a reminder to do fuelup install? Then again it might be intentionally not updated on purpose (if say forc has a breaking change that breaks a dev's project). Due to this reason I decided not to include this action message.

Also included plugins in the check.

$ fuelup check
forc - up to date: v0.15.1
 - forc-fmt - up to date: v0.15.1
 - forc-explore - update available: v0.12.2 -> v0.15.1
 - forc-lsp not found
fuel-core - up to date: v0.8.0
fuelup - up to date: v0.1.2

@eightfilms eightfilms self-assigned this Jun 7, 2022
@adlerjohn
Copy link
Contributor

adlerjohn commented Jun 20, 2022

Maybe add an option that explicitly lists bundled plugins, e.g. --verbose?

Copy link
Contributor

@mitchmindtree mitchmindtree left a comment

Choose a reason for hiding this comment

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

For the most part looking good!

Added a couple comments for now, but might be a little easier to review after landing #73 and merging or rebasing onto it.

src/colors.rs Outdated Show resolved Hide resolved
src/config.rs Outdated Show resolved Hide resolved
src/config.rs Outdated Show resolved Hide resolved
Base automatically changed from binggh/toolchain-support to master June 20, 2022 07:07
@eightfilms eightfilms added enhancement enhancement to a current feature and removed blocked labels Jun 20, 2022
@eightfilms eightfilms mentioned this pull request Jun 20, 2022
2 tasks
@eightfilms eightfilms marked this pull request as ready for review June 21, 2022 03:50
src/fmt.rs Outdated Show resolved Hide resolved
src/fmt.rs Show resolved Hide resolved
src/ops/fuelup_check.rs Outdated Show resolved Hide resolved
src/ops/fuelup_check.rs Outdated Show resolved Hide resolved
src/ops/fuelup_check.rs Outdated Show resolved Hide resolved
src/ops/fuelup_check.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@mitchmindtree mitchmindtree left a comment

Choose a reason for hiding this comment

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

:shipit:

@eightfilms eightfilms merged commit 38f7bd1 into master Jun 22, 2022
@eightfilms eightfilms deleted the binggh/fuelup-check branch June 22, 2022 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement to a current feature
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

fuelup check: command to check for updates
3 participants