zed icon indicating copy to clipboard operation
zed copied to clipboard

Zed keeps checking for LSP updates (and disabling LSPs irreversibly in the process), Even when offline, And this is really hurting my UX.

Open MinecraftPublisher opened this issue 3 months ago • 14 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

Title. Sometimes when restarting zed or opening it after a fresh boot, It starts to check for updates for the LSP of ANY file I open, Has no timeout duration and keeps re-checking for updates, All the while the LSP DOES NOT WORK. Seriously, This is extremely frustrating. PLEASE fix this.

Note: This is not related to auto-update as that is also set to FALSE in my config.

Environment

Zed: v0.127.3 (Zed) OS: macOS 13.6.0 Memory: 16 GiB Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

  1. Check for internet connectivity (ping google.com, or any other website)
  2. If failed, Quit and use the already existing LSP
  3. If succeeded, Download the new LSP.

Or, Easier solution, DO NOT DISABLE THE LSP WHILST CHECKING FOR OR INSTALLING UPDATES. Seriously.

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

MinecraftPublisher avatar Mar 25 '24 18:03 MinecraftPublisher

Or even better just do not auto-update LSPs on every launch. (Or preferrably at all)

jansol avatar Mar 25 '24 19:03 jansol

That works too :P

MinecraftPublisher avatar Mar 25 '24 19:03 MinecraftPublisher

@MinecraftPublisher - I recently added code that would perform auto-updates on language servers that we obtain through npm, as prior to this, we never updated the language server after the initial install. Not all of our languages are installed via npm, some are through GitHub. Which languages are you running into this on? Just trying to see if this is related to my change or not. We also have had tons of reports in the past of language servers getting stuck in the checking for updates status and never resolving - Im curious which thing this issue might relate to.

JosephTLyons avatar Mar 25 '24 20:03 JosephTLyons

  • https://github.com/zed-industries/zed/issues/4628

JosephTLyons avatar Mar 25 '24 20:03 JosephTLyons

The problem isn't never resolving, It actually works fine with proper internet connection, But the problem arises when I don't have an internet connection, And the code doesn't check for internet connectivity and retries infinitely, Effectively disabling the LSPs for everything until I am back online.

MinecraftPublisher avatar Mar 25 '24 20:03 MinecraftPublisher

Whether or not it should show tasks in progress, including progress cancellations, so that cancellations are allowed when checking for updates.

Similar to android studio image

0x2CA avatar Mar 26 '24 01:03 0x2CA

Oddly enough, this does not happen with Rust. We do not go into this endless update loop with Rust files.

osiewicz avatar Mar 26 '24 11:03 osiewicz

could this be because zed uses tree sitter alone for rust? i haven't read the source code so i have no idea, just a wild guess.

MinecraftPublisher avatar Mar 27 '24 04:03 MinecraftPublisher

Rust-analyzer is used for Rust. Tree-sitter is used for syntax highlighting of all languages.

jansol avatar Mar 27 '24 11:03 jansol

Yeah, tree-sitter has nothing to do with it. All I'm saying is that it might be an issue with our integration with specific language servers, as RA does not have that issue.

osiewicz avatar Mar 27 '24 11:03 osiewicz

Any update on this? I don't think it takes that long to add an "auto_update_lsp" option to the config system

MinecraftPublisher avatar Mar 29 '24 13:03 MinecraftPublisher

I came to report the same or related issue for pyright. When offline, on startup, Zed will take something like a minute checking for updates to pyright before timing out with "Auto update failed", then activating the existing version of pyright. During the update check attempt, I get no code analysis.

Version: Zed 0.130.7 e2dbfa7de527500463772167a4736fc48cfbcebd

fotonick avatar Apr 16 '24 05:04 fotonick

For me it just doesn't stop, And infinitely checks for updates.

MinecraftPublisher avatar Apr 16 '24 15:04 MinecraftPublisher

To clarify, this can be easily reproduced if network is offline.

paulmillr avatar May 15 '24 00:05 paulmillr