Kitty: Support checking for new versions

Created on 28 Jan 2019  路  13Comments  路  Source: kovidgoyal/kitty

It would be really nice if there was a way to have Kitty auto-check for newly released versions. Even better would be the "download and update on exit" that many apps support. I didn't realize that I was five releases behind until I happened to come to the GitHub page for an unrelated reason, and a couple of the releases actually fixed a problem that I was having (CPU usage resulting in slowness).

By the way, thanks for kitty! I am very much enjoying it.

I'm on the MacOS platform if that is important.

enhancement

Most helpful comment

Just got a notification about the new version. It would be great if this did not happen on OSes that have a (sane) package manager. Having programs check for updates on their own and then open prompts about it is very annoying to me, since managing updates is not the job of the user or of each individual installed program. Should I open a new issue about this, @kovidgoyal ?

I can see how this might be useful for users with ... operating systems that are missing a basic feature (i have honestly no idea how you can live with that?), but I doubt anyone on at least Linux wants this.

Also (though this is very much my personal opinion) it felt like a violation of privacy to just realize kitty connects to the internet and sends a (trackable) request without my knowledge or consent.

All 13 comments

This is not what you asked for but it might still help: #1108.

I think this is the package manager's job. How did you install it? Brew? There's an option on the Watch button on every repo that allows you to be notified of releases. I don't know how well it works, but you could give it a try.

Well enough people have asked about it, that I guess I should look into adding a popup notification (with an option to disable it). The annoying part is that kitty has no real infrastructure for popups as the toolkit it uses doesn't support them. So it would be a fair amount of work, still maybe a popup infrastructure could be re-used for other things in the future.

For the infrastructure, I suggest using libnotify and letting the OS handle drawing the notifications (I hope it exists in some form on MacOS as well). This way you get good integration with the OS, same visual style, it will respect "do not disturb" mode, etc. etc.

Just got a notification about the new version. It would be great if this did not happen on OSes that have a (sane) package manager. Having programs check for updates on their own and then open prompts about it is very annoying to me, since managing updates is not the job of the user or of each individual installed program. Should I open a new issue about this, @kovidgoyal ?

I can see how this might be useful for users with ... operating systems that are missing a basic feature (i have honestly no idea how you can live with that?), but I doubt anyone on at least Linux wants this.

Also (though this is very much my personal opinion) it felt like a violation of privacy to just realize kitty connects to the internet and sends a (trackable) request without my knowledge or consent.

@phiresky As per the docs, you can set update_check_interval to 0 to disable the update check completely. 馃憤

(P.S. There are several package managers for OS X, homebrew is probably the most common, like there are lots of different package managers for Linux. Kitty happens to not be setup to use any of them at the moment. Please keep your OS snobbery to a dull roar.)

Maybe we should add a note for packagers to change the default update_check_interval to 0 because package managers have their own update mechanism.

Sure, no harm

I was perplexed to see kitty putting notifications on my desktop. I was always up-to-date with the releases so I must've not noticed before. Or maybe something changed in the runtime configs in a recent release. I came here right away and found this issue and a newer one: #2481

@teancom it sucks that macos has no readily-available package for kitty. But writing a formula for it is a trivial task and you can even submit it to core repo for other macos users' benefit. From your profile you seem to be adequately familiar with Ruby. A tiny declarative script shouldn't be an issue to formulate at all for a developer like you.
And well, hey, isn't this the beauty of open-source communities after all? We all can contribute and we all benefit from it.
Or as @Luflosi suggested, you can add kitty's releases feed to your reader/email-client of choice. I do that personally for many packages that I maintain. Super simple and doesn't task upstream with the burden of embedding update mechanisms in their software.

@kovidgoyal networking isn't a cheap task and it just feels wrong (scope creep) to embed it inside a terminal emulator. And at startup too!.. Please reconsider.
The notifications infra could definitely prove useful, but update-checking and even the suggested self-updating mechanisms can also lead to subtle bad results. Especially on LTS systems. An app that self-updates completely bypasses all the work package maintainers do to ensure that versions match and the system is stable. But you probably already know that.

If you're still set on leaving that feature in.. Maybe we can reach a middle-ground?

  • update checks (and any other future mechanisms regarding networking) can be disabled by default in the terminal's configuration, so it's an opt-in rather than opt-out feature.
  • even better: the code for update checks can be completely disabled at compile time (in the configure script, or a header file), allowing package maintainers to leave it out of the built binary and its runtime.

On other news I'm already working on option 2 by writing a patch for maintainers. Once done, approved, and tested, I'll forward it here so we can maybe work something out of it. I'd definitely appreciate your help on pointing out where the relevant source files for this are -- I'm still completely new to the codebase.

What on earth??? kitty is written in python, whose std lib has networking builtin. Not to mention that kitty's own remote control feature uses networking when used over a socket. kitty has been able to do networking since day one. And there is already a build time option to turn off the update checks.

it sucks that macos has no readily-available package for kitty

Sure there are, I know of two: homebrew cask and nix. To install, simply do brew cask install kitty or nix-env --install kitty. See https://github.com/Homebrew/homebrew-cask/blob/9c2897080aa827e31b4244c542f1b6d8b9322e2d/Casks/kitty.rb and https://github.com/NixOS/nixpkgs/blob/5b6dbb5e18efde69e375752ec5d13cb9bf2f3cf2/pkgs/applications/misc/kitty/default.nix.

even the suggested self-updating mechanisms

This has not been implemented and most likely never will be, for the reasons you mentioned.

even better: the code for update checks can be completely disabled at compile time

While it can't be disabled completely, it can be turned off by default with a flag at build time, see at the bottom of https://sw.kovidgoyal.net/kitty/build.html#note-for-linux-macos-packagers. With this possibility available, I don't see a reason to disable the update check completely. If a user _really_ wants to enable this, why should we not let him/her.

@kovidgoyal I'm still exploring the source. That part about how I'd build it was nothing more than an assumption.
As far as I was aware prior, I thought the remote features were plugins, that kitty at its core is C and only the plugins were python.
Thanks for clarifying.

@Luflosi thanks for the last link this is exactly what I needed.

If a user really wants to enable this, why should we not let him/her.

some maintainers offer feature-based package splitting; but not all distros do. Mine doesn't. If users want to customise they're totally free to build from source using our packaging tools (or use an external unprivileged package manager)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mihaicristiantanase picture mihaicristiantanase  路  3Comments

wavexx picture wavexx  路  3Comments

metalelf0 picture metalelf0  路  4Comments

RedBeard0531 picture RedBeard0531  路  4Comments

keyofnight picture keyofnight  路  3Comments