Description
In early 2021 (blog post), the Go extension switched to using gopls
as the default language feature provider. Since then, the Go Tools team and Go project contributors have continuously worked hard to improve the stability, performance, and functionality of gopls. Nowadays, we rarely see users disabling gopls in our issue tracker, even as the estimated number of VS Code Go extension users continues to grow.
Although gopls reached feature parity a while ago and we believe it performs better than the legacy language provider in many aspects, we kept the option to use the legacy language provider until now just in case users need to work with older versions of Go for which gopls's test coverage may not be sufficient. However, most of the legacy tools supporting the legacy language provider are no longer actively maintained and do not work with recent Go versions that require Go modules. According to our user surveys, very few users use go 1.15 or older.
It's time to remove this old code path, simplify our codebase, and focus on enhancing the delivery of the gopls-based language features.
- In the next release of the extension (v0.39.0), we will notify affected users and delete the legacy provider after the release in September 2023.
- After September 2023, setting
"go.useLanguageServer": false
will turn off all language features such as code completion, go-to-definition, formatting, auto-import, diagnostics, etc.
We have been asking users when they choose to disable the language server (by setting "go.useLanguageServer") for some time. Thank you so much for providing feedback and sharing your thoughts on what to improve.
Over the last 6 months, approximately 260 users responded. Here are the findings and our plans to address the concerns raised by users:
- Around 17% users disabled gopls due to performance issues. We believe the latest release of gopls (
v0.12
) addresses many of known scalability issues. - Another 30% users disabled gopls because features like auto-completion or go-to-definition didn't seem to work. We think that is due to less-intuitive configuration requirements, such as gopls-compatible workspace layout, multi-module repositories, build tags support. The "Zero-config gopls workspaces" project aims to improve the user experience, and the development effort is already underway. We also plan to clean up the documentation and the settings to improve the discoverability of necessary settings when users work on projects that require non-default settings.
- About 11% users reported issues with file corruption or incorrect imports, which is concerning. We are guessing those users were experiencing issues like x/tools/gopls: file corruption on case-insensitive filesystems go#57081 and x/tools/gopls: when working in vendor mode autoimport adds packages from
vendor
dir go#56291. We have prioritized addressing these issues for upcoming gopls releases. If you are experiencing file corruption, please open a new issue so we can triage and investigate the root cause.
cc @golang/tools-team