Skip to content

Auto Update #170

Closed
Closed
@mhanberg

Description

@mhanberg

Description

In order to not have to implement this functionality inside every editor extension, I want Next LS itself to be able to check the GitHub API to see if there is a new release, then prompt the user to install it.

If the user says yes, Next LS will download it, make it executable, and put it in the right place. Then tell the user to restart their editor to use it.

I believe that this will work, even if you copy the new binary into the same place as the existing binary, as the current instance of the server will be kept in memory and working (I think).

Questions

  • Which HTTP library do we use? I would say we should just use httpc, but Burrito already installs Req, so i figure it isn't too bad to also use that.

Acceptance Criteria

  • the above description is satisfied
  • the user is not impacted if they do not have an internet connection
  • We only check once/few times a day for a new release. Might need to create a global (meaning, in ~/.cache/elixir-tools/nextls database that all instances can read from and basically just keep a timestamp in there of the last check.
  • Tested in Neovim and Visual Studio Code
  • can disable if you manage nextls with a different package manager

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions