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

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

Open
1 task done
MinecraftPublisher opened this issue Mar 25, 2024 · 20 comments
Labels
bug [core label] language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors

Comments

@MinecraftPublisher
Copy link

Check for existing issues

  • 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 MinecraftPublisher added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Mar 25, 2024
@JosephTLyons JosephTLyons added language An umbrella label for all programming languages syntax behaviors language server An umbrella label for all language servers and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Mar 25, 2024
@jansol
Copy link
Contributor

jansol commented Mar 25, 2024

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

@MinecraftPublisher
Copy link
Author

That works too :P

@JosephTLyons
Copy link
Collaborator

JosephTLyons commented Mar 25, 2024

@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
Copy link
Collaborator

JosephTLyons commented Mar 25, 2024

@MinecraftPublisher
Copy link
Author

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.

@0x2CA
Copy link
Contributor

0x2CA commented Mar 26, 2024

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

@osiewicz
Copy link
Contributor

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

@MinecraftPublisher
Copy link
Author

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.

@jansol
Copy link
Contributor

jansol commented Mar 27, 2024

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

@osiewicz
Copy link
Contributor

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.

@MinecraftPublisher
Copy link
Author

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

@fotonick
Copy link

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 e2dbfa7

@MinecraftPublisher
Copy link
Author

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

@paulmillr
Copy link

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

@yuqiang-yuan
Copy link

I'm facing the same situation. If Zed discovers that there is a new version of rust-analyzer, it deletes my local file and tries to download the new version from GitHub. However, the GitHub rate limit is reached, so no file is downloaded. As a result, rust-analyzer is missing.

@whereistejas
Copy link

A temporary solution to this problem is to copy the rust-analyzer binary from .cargo/bin into the ~/Library/Application Support/languages/rust-analyzer/ folder.

@MinecraftPublisher
Copy link
Author

But only for rust. What about other languages?

@casperhart
Copy link

This is a big issue for me too as it practically means I have no LSP available. I often will have internet / proxy issues that will prevent an LSP from updating, and if the LSP fails to update then it also fails to start.

The expected behaviour would be to use the existing LSP install when an LSP update fails, rather than preventing the LSP from starting. Even better would be to check for an update first, and ask the user if they would like to install it only if a new version is available, as this problem occurs even if running the latest LSP version.

For me this is happening with json-language-server, zed v0.162.5

@ferrao
Copy link

ferrao commented Nov 25, 2024

This is a big issue for me too as it practically means I have no LSP available. I often will have internet / proxy issues that will prevent an LSP from updating, and if the LSP fails to update then it also fails to start.

This is the problem right here! Of course it's nice to be able to disable auto-updates, but that is not the issue.
The problem is basically Zed LSP does not work at all when using it offline.

@joeltg
Copy link

joeltg commented Dec 4, 2024

Just chiming in since I had the experience of getting on a flight, excited to work on a project, only to find that the LSP would not start since it got stuck checking for updates while offline. This was extremely frustrating and not at all what I expect from an IDE!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors
Projects
None yet
Development

No branches or pull requests