emacs-fsharp-mode icon indicating copy to clipboard operation
emacs-fsharp-mode copied to clipboard

Add a possibility to update LSP server

Open juergenhoetzel opened this issue 6 years ago • 2 comments

eglot-fsharp automatically installs the fsautocomplete.exe LSP server. But there is no way to update this fsautocomplete.exe.

juergenhoetzel avatar Nov 30 '19 13:11 juergenhoetzel

I have some code in lsp-mode for auto-updating if you want to use that as a base. It should be available here: https://github.com/emacs-lsp/lsp-mode/blob/85682e663fe4307f890a65ef207fbe03eb506724/lsp-fsharp.el#L191

TOTBWF avatar Dec 01 '19 02:12 TOTBWF

I have some code in lsp-mode for auto-updating if you want to use that as a base. It should be available here: https://github.com/emacs-lsp/lsp-mode/blob/85682e663fe4307f890a65ef207fbe03eb506724/lsp-fsharp.el#L191

Thanks! I was thinking about a way to update only when the remote version is newer.

Sadly url-copy-file has no options to specify cache headers and also is blocking Emacs while downloading:

(benchmark 1 '(url-copy-file "https://ci.appveyor.com/api/projects/fsautocomplete/fsautocomplete/artifacts/bin/pkgs/fsautocomplete.netcore.zip?branch=master"  "/tmp/out.zip" t))
"Elapsed time: 82.575172s (0.397937s in 7 GCs)"

I thought about shelling out to curl to use cache headers but that would be platform-dependent:

time curl   -s --time-cond out.zip  -L -o /tmp/out.zip "https://ci.appveyor.com/api/projects/fsautocomplete/fsautocomplete/artifacts/bin/pkgs/fsautocomplete.netcore.zip?branch=master"
real	0m1,953s
user	0m0,027s
sys	0m0,010s

@Krzysztof-Cieslak @enricosada would it be possible to publish fsautocomplete.exe as a dotnet tool to simplify the installation and enable a simple dotnet tool update?

juergenhoetzel avatar Dec 01 '19 13:12 juergenhoetzel

Already implemented by 9f2ed8e6ff6855ef109b9ea1308a7c8e2709c624

juergenhoetzel avatar Mar 24 '23 20:03 juergenhoetzel