Skip to content

feat: update checker #15543

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

Closed
wants to merge 1 commit into from
Closed

Conversation

crowlKats
Copy link
Member

No description provided.

@kitsonk
Copy link
Contributor

kitsonk commented Aug 23, 2022

You don't want this running under the lsp subcommand, as the output would be missed. I assume there are other subcommands it should be supressed.

Also, it seems to check every invocation?

let client = client_builder.build()?;

let ver = if version::is_canary() {
let res = client.get("https://version.deno.dev/canary").send().await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

hardcoded values "buried" in code feels bad... maybe should be extracted out as a const?

Copy link
Member

Choose a reason for hiding this comment

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

let client = client_builder.build()?;

let ver = if version::is_canary() {
let res = client.get("https://version.deno.dev/canary").send().await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we be setting the UA string like with the file fetcher?

@crowlKats
Copy link
Member Author

yes, it shouldnt run under some subcommands, and yes, it shouldnt run on every invocation; PR is not ready yet

@kitsonk
Copy link
Contributor

kitsonk commented Aug 23, 2022

yes, it shouldnt run under some subcommands, and yes, it shouldnt run on every invocation; PR is not ready yet

ok, let me know when you want me to complain

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

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

im concerned about startup time. how bad is it compared to main? (oh its not ready yet, my bad)

@piscisaureus
Copy link
Member

To avoid ruining startup time, I think we should do the check in the background and display update info on the next invocation.

colors::green_bold(format!(
"Version '{ver}' of Deno is out, update with `deno upgrade`."
))
);
Copy link
Member

@dsherret dsherret Sep 5, 2022

Choose a reason for hiding this comment

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

I was just thinking that we should maybe only output this when stderr is a tty (and this outputs to stderr instead). That way we won’t randomly break anyone piping deno process output.

Copy link
Member

Choose a reason for hiding this comment

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

Agree! Good idea.

@bartlomieju
Copy link
Member

Closing in favor of #15974

@crowlKats crowlKats deleted the update_checker branch November 20, 2022 12:39
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.

6 participants