ZIm/crates/languages/src
Nils Koch ce9e4629be
Add go version to gopls cache key (#20922)
Closes #8071

Release Notes:

- Changed the Go integration to check whether an existing `gopls` was compiled for the current `go` version.

Previously we cached gopls (the go language server) as a file called
`gopls_{GOPLS_VERSION}`. The go version that gopls was built with is
crucial, so we need to cache the go version as well.

It's actually super interesting and very clever; gopls uses go to parse
the AST and do all the analyzation etc. Go exposes its internals in its
standard lib (`go/parser`, `go/types`, ...), which gopls uses to analyze
the user code. So if there is a new go release that contains new
syntax/features/etc. (the libraries `go/parser`, `go/types`, ...
change), we can rebuild the same version of `gopls` with the new version
of go (with the updated `go/xxx` libraries) to support the new language
features.

We had some issues around that (e.g., range over integers introduced in
go1.22, or custom iterators in go1.23) where we never updated gopls,
because we were on the latest gopls version, but built with an old go
version.

After this PR gopls will be cached under the name
`gopls_{GOPLS_VERSION}_go_{GO_VERSION}`.

Most users do not see this issue anymore, because after
https://github.com/zed-industries/zed/pull/8188 we first check if we can
find gopls in the PATH before downloading and caching gopls, but the
issue still exists.
2024-12-09 12:56:01 +01:00
..
bash Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
c Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
cpp Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
css Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
diff Add Diff language (#19129) 2024-10-15 16:02:12 -04:00
go Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
gomod File context for assistant panel (#9712) 2024-03-29 13:55:01 -07:00
gowork File context for assistant panel (#9712) 2024-03-29 13:55:01 -07:00
javascript Added JavaScript runnable detection for context and suite methods (#21719) 2024-12-09 13:17:51 +02:00
jsdoc Add language icons to the language selector (#21298) 2024-12-02 15:01:09 -03:00
json Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
jsonc Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
markdown Add YAML/TOML frontmatter injections for markdown (#21503) 2024-12-06 12:34:15 -05:00
markdown-inline Hide Markdown-Inline language from users with a new 'hidden' flag on language configs (#17104) 2024-08-29 11:23:33 -07:00
python Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
regex Add language icons to the language selector (#21298) 2024-12-02 15:01:09 -03:00
rust Revert accidental change to Rust outline files (#21545) 2024-12-04 11:58:56 -07:00
tsx Added JavaScript runnable detection for context and suite methods (#21719) 2024-12-09 13:17:51 +02:00
typescript Added JavaScript runnable detection for context and suite methods (#21719) 2024-12-09 13:17:51 +02:00
yaml Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00
bash.rs tasks: Expose captured variables to ContextProvider (#12134) 2024-05-22 19:45:43 +02:00
c.rs Enable clangd's dot-to-arrow feature (#21142) 2024-11-28 10:43:25 +02:00
css.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00
go.rs Add go version to gopls cache key (#20922) 2024-12-09 12:56:01 +01:00
json.rs Allow overrides for json-language-server settings (#20748) 2024-11-22 17:50:25 -05:00
lib.rs Add language icons to the language selector (#21298) 2024-12-02 15:01:09 -03:00
python.rs toolchains: Run listing tasks on background thread (#21414) 2024-12-02 21:03:31 +01:00
rust.rs tasks/rust: Add support for running examples as binary targets (#21412) 2024-12-02 19:53:51 +01:00
tailwind.rs tailwind: Allow configuring the rootFontSize (#20500) 2024-11-11 17:13:00 +01:00
typescript.rs Use eslint from the fork (#21233) 2024-11-27 12:02:39 +02:00
vtsls.rs pylsp: Prefer version from user venv (#21069) 2024-11-25 00:54:47 +01:00
yaml.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00