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

Clojure-lsp not starting when offline #1299

Open
temochka opened this issue Sep 14, 2021 · 2 comments
Open

Clojure-lsp not starting when offline #1299

temochka opened this issue Sep 14, 2021 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers lsp pr-welcome

Comments

@temochka
Copy link

When my Mac is offline (or I’m on a corporate VPN) and I open a Clojure project in VS Code with Calva, the Clojure-lsp server doesn’t start and thus all LSP-powered functionality is unavailable. Calva Diagnostics : Clojure-lsp Server Info says "There is no clojure-lsp server running." The welcome message from Calva looks as usual, there’s no visible indication of an error.

As soon as I re-connect to wi-fi (or disconnect from the corporate VPN) and restart VS Code, Clojure-lsp starts as expected. I was able to reproduce this issue both on my work and personal laptops.

Note: I do realize that by default Calva downloads the latest version of Clojure-lsp, but I always assumed it would re-use the latest available download if offline.

@PEZ PEZ added bug Something isn't working lsp good first issue Good for newcomers pr-welcome labels Sep 14, 2021
@PEZ
Copy link
Collaborator

PEZ commented Sep 14, 2021

Hello @temochka. Thanks for the issue report!

We should definitely be able to use whatever clojure-lsp we have downloaded since before.

@bpringe
Copy link
Member

bpringe commented Sep 15, 2021

Calva uses the last downloaded clojure-lsp binary if the download fails (at least, it is supposed to). Does it seem like there is an issue with this? If so, we should investigate.

If there was no previous download, then there will be no previous binary.

One solution/workaround to using clojure-lsp offline is to download the binary when/where you do have a connection, and make Calva use that downloaded binary: https://calva.io/clojure-lsp/#using-a-custom-clojure-lsp-native-binary.

kstehn pushed a commit that referenced this issue Jan 19, 2022
Proper error handling on lsp version retrival
without it the lsp couldn't be started even when an executable was already existing
PEZ added a commit that referenced this issue Jan 22, 2022
…r-handling

Fixing #1299 - Clojure LSP not starting when offline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers lsp pr-welcome
Projects
None yet
Development

No branches or pull requests

3 participants