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

Failed to Download Go language server #7534

Closed
1 task done
Andree37 opened this issue Feb 8, 2024 · 4 comments · Fixed by #7571
Closed
1 task done

Failed to Download Go language server #7534

Andree37 opened this issue Feb 8, 2024 · 4 comments · Fixed by #7571
Labels
bug [core label] go Go programming language support language server failure Language server doesn't work as expected language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors

Comments

@Andree37
Copy link

Andree37 commented Feb 8, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Opening a go project starts to download gopls, but this fails after some retries.

Using Go v1.21

Note: Even though the logs state that the language server has started before failing to download, this is not true, and I do not have LSP features.

Environment

Zed: v0.121.5 (Zed)
OS: macOS 14.3.0
Memory: 16 GiB
Architecture: aarch64

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

No response

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

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

2024-02-08T00:14:23+00:00 [INFO] open paths ["/Users/andre/.config/zed/settings.json"]
2024-02-08T00:14:23+00:00 [INFO] Initializing default prettier with plugins {}
2024-02-08T00:14:23+00:00 [INFO] starting language server "json-language-server", path: "/Users/andre/.config/zed", id: 4
2024-02-08T00:14:23+00:00 [INFO] Node runtime install_if_needed
2024-02-08T00:14:24+00:00 [INFO] Node runtime install_if_needed
2024-02-08T00:14:25+00:00 [INFO] 0 unhandled notification LogMessage:
{
  "level": 1,
  "message": "[INFO] [default] [2024-02-08T00:14:25.999Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex",
  "metadataStr": "[INFO] [default] [2024-02-08T00:14:25.999Z]",
  "extra": [
    "[fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex"
  ]
}
2024-02-08T00:14:26+00:00 [INFO] 0 unhandled notification LogMessage:
{
  "level": 1,
  "message": "[INFO] [default] [2024-02-08T00:14:26.101Z] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 102 ms",
  "metadataStr": "[INFO] [default] [2024-02-08T00:14:26.101Z]",
  "extra": [
2024-02-08T00:56:27+00:00 [ERROR] server stderr: Some("")
2024-02-08T00:56:27+00:00 [ERROR] crates/zed/src/languages/go.rs:357: no cached binary
2024-02-08T00:56:27+00:00 [INFO] About to spawn test binary
2024-02-08T00:56:27+00:00 [WARN] test binary failed to launch
2024-02-08T00:56:27+00:00 [WARN] test binary check failed
2024-02-08T00:56:27+00:00 [INFO] beginning to reinstall server
2024-02-08T00:56:27+00:00 [INFO] deleting server container
2024-02-08T00:56:27+00:00 [INFO] starting language server "gopls", path: "/Users/andre/github/Quasarch/quasarplane", id: 3
2024-02-08T00:56:27+00:00 [ERROR] crates/zed/src/languages/go.rs:357: no cached binary
2024-02-08T00:56:27+00:00 [ERROR] failed to start language server "gopls": Failed to find a release
2024-02-08T00:56:27+00:00 [ERROR] server stderr: Some("")
2024-02-08T00:56:27+00:00 [ERROR] crates/zed/src/languages/go.rs:357: no cached binary
2024-02-08T00:56:27+00:00 [INFO] About to spawn test binary
2024-02-08T00:56:27+00:00 [WARN] test binary failed to launch
2024-02-08T00:56:27+00:00 [WARN] test binary check failed
2024-02-08T00:56:27+00:00 [INFO] beginning to reinstall server
2024-02-08T00:56:27+00:00 [INFO] deleting server container
2024-02-08T00:56:27+00:00 [INFO] starting language server "gopls", path: "/Users/andre/github/Quasarch/quasarplane", id: 4
2024-02-08T00:56:27+00:00 [ERROR] crates/zed/src/languages/go.rs:357: no cached binary
2024-02-08T00:56:27+00:00 [ERROR] failed to start language server "gopls": Failed to find a release
2024-02-08T00:56:27+00:00 [ERROR] server stderr: Some("")
2024-02-08T00:56:27+00:00 [ERROR] crates/zed/src/languages/go.rs:357: no cached binary
2024-02-08T00:56:27+00:00 [INFO] About to spawn test binary
2024-02-08T00:56:27+00:00 [WARN] test binary failed to launch
2024-02-08T00:56:27+00:00 [WARN] test binary check failed
2024-02-08T00:56:27+00:00 [INFO] beginning to reinstall server
2024-02-08T00:56:27+00:00 [INFO] deleting server container
2024-02-08T00:56:27+00:00 [INFO] starting language server "gopls", path: "/Users/andre/github/Quasarch/quasarplane", id: 5
2024-02-08T00:56:27+00:00 [INFO] 0 unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-02-08T00:56:27.715Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-02-08T00:56:27.715Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2024-02-08T00:56:27+00:00 [ERROR] crates/zed/src/languages/go.rs:357: no cached binary
2024-02-08T00:56:27+00:00 [ERROR] failed to start language server "gopls": Failed to find a release
2024-02-08T00:56:27+00:00 [ERROR] server stderr: Some("")
2024-02-08T00:56:27+00:00 [ERROR] Hit 4 reinstallation attempts for "gopls"
@Andree37 Andree37 added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Feb 8, 2024
@mrnugget
Copy link
Member

mrnugget commented Feb 8, 2024

Okay, I can reproduce. There's something wrong with the release-downloading code.

@mrnugget
Copy link
Member

mrnugget commented Feb 8, 2024

This broke the downloading of gopls: #7189 Because the Go code just downloads the list of releases to get a version, it doesn't care about the assets.

SomeoneToIgnore added a commit that referenced this issue Feb 8, 2024
Fixes #7534 by not requiring
assets for gopls and vscode-eslint langservers — those two are the only
ones in Zed that do not use assets directly when determining langserver
version and retrieving those.
All other servers deal with assets, hence require those to be present.

The problem with https://github.com/tamasfe/taplo/releases is that they
host multiple binary releases in the same release list, so for now the
code works because only the langserver has assets — but as soon as
another release there gets assets, it will break again.
We could filter out those by names also, but they also tend to change
(and can be edited manually), so keeping it as is for now.

Release Notes:

- Fixed gopls language server downloads
([7534](#7534))
@syntastical
Copy link

@SomeoneToIgnore Sorry to both you, but is there a work around for this until the next zed release?

@SomeoneToIgnore
Copy link
Contributor

I'm afraid there's none unless you want to build Zed from source and run it for a while.

We plan to make a hotfix release with this, as it's surely a big degradation for golang users.
Before doing that, we'd like to test it for some while though (probably, before tomorrow).

SomeoneToIgnore added a commit that referenced this issue Feb 8, 2024
Fixes #7534 by not requiring
assets for gopls and vscode-eslint langservers — those two are the only
ones in Zed that do not use assets directly when determining langserver
version and retrieving those.
All other servers deal with assets, hence require those to be present.

The problem with https://github.com/tamasfe/taplo/releases is that they
host multiple binary releases in the same release list, so for now the
code works because only the langserver has assets — but as soon as
another release there gets assets, it will break again.
We could filter out those by names also, but they also tend to change
(and can be edited manually), so keeping it as is for now.

Release Notes:

- Fixed gopls language server downloads
([7534](#7534))
SomeoneToIgnore added a commit that referenced this issue Feb 8, 2024
Fixes #7534 by not requiring
assets for gopls and vscode-eslint langservers — those two are the only
ones in Zed that do not use assets directly when determining langserver
version and retrieving those.
All other servers deal with assets, hence require those to be present.

The problem with https://github.com/tamasfe/taplo/releases is that they
host multiple binary releases in the same release list, so for now the
code works because only the langserver has assets — but as soon as
another release there gets assets, it will break again.
We could filter out those by names also, but they also tend to change
(and can be edited manually), so keeping it as is for now.

Release Notes:

- Fixed gopls language server downloads
([7534](#7534))
@JosephTLyons JosephTLyons added language An umbrella label for all programming languages syntax behaviors go Go programming language support language server failure Language server doesn't work as expected language server An umbrella label for all language servers and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] go Go programming language support language server failure Language server doesn't work as expected language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants