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

feat(cli): check and notify about updates on tauri dev, closes #3789 #3960

Merged
merged 4 commits into from
Apr 25, 2022

Conversation

codekidX
Copy link
Contributor

this feature helps the users of tauri know that there is a new version of CLI avaliable. it uses metadata.json from the tooling/cli directory (raw asset from github) and checks with the bundled version of metadata.json.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • [ x] I have added a convincing reason for adding this feature, if necessary

Other information

this feature helps the users of tauri know that there is a new version of CLI avaliable. it uses `metadata.json` from the tooling/cli directory (raw asset from github) and checks with the bundled version of metadata.json.
@codekidX codekidX requested a review from a team April 25, 2022 01:19
@codekidX codekidX requested a review from a team April 25, 2022 14:06
@codekidX codekidX requested a review from a team as a code owner April 25, 2022 14:06
@codekidX codekidX requested a review from a team April 25, 2022 14:06
Copy link
Member

@lucasfernog lucasfernog left a comment

Choose a reason for hiding this comment

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

Nice PR :) thank you!

@lucasfernog lucasfernog merged commit a649aad into tauri-apps:dev Apr 25, 2022
Ok((msg, sleep)) => {
if sleep {
logger.log(msg);
std::thread::sleep(std::time::Duration::from_secs(3));
Copy link
Member

Choose a reason for hiding this comment

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

Why 3 secs sleep when there is a new version available?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@amrbashir it is to make user aware of the update, if we don't sleep at that time next command might clear the terminal buffer and user might miss it completely or not care about it.

Copy link
Member

@amrbashir amrbashir Apr 25, 2022

Choose a reason for hiding this comment

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

but that delay is bad for UX IMO. Like I'd want the dev process to start as soon as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what can be an alternative, may be ask for auto update (Y/n) instead?

Copy link
Member

Choose a reason for hiding this comment

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

No, that also is a bad UX. I think we should just remove this delay. And if users don't see the notification, it is not that important.

Also note that after stable 2.0 release, users might deliberately choose to stay on 1.x for stability and we probably shouldn't annoy them because of that.

I honestly think we should remove this notification after 1.0 stable release is out because the CLI and other Tauri components will be stable by then and there will be no breaking changes moving forwards so you wouldn't need to update the CLI as often as the "beta" or "rc" phase.

dceddia pushed a commit to dceddia/tauri that referenced this pull request May 14, 2022
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.

3 participants