You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today's module is golang.org/x/tools/gopls — the official Go language server. This module was selected because it had the most recent commit activity (golang/tools was last pushed 2026-02-19, the most recently updated direct dependency).
Module Overview
gopls is Go's official Language Server Protocol (LSP) implementation, maintained by the Go team. It provides IDE features: code completion, go-to-definition, find-references, hover documentation, formatting, and diagnostics.
Version in go.mod: v0.21.1 (latest release — ✅ up to date)
License: BSD-3-Clause
Latest release: gopls/v0.21.1 (2026-02-12) — bugfix for golang/go#77260, references broken when highlighting function names
Current Usage in gh-aw
gopls plays two distinct roles in this repository:
Pattern: Standard Go tools pattern with //go:build tools build tag
Install: go install golang.org/x/tools/gopls@v0.21.1 via make tools
This is the canonical Go pattern for version-pinning development tools. All contributors install the exact same gopls version, ensuring consistent LSP behavior across environments.
Reverted importsSource default back to goimports after bug #74280
v0.19.0
Added gopls check subcommand with -severity flag
Best Practices from Maintainers
Use go install golang.org/x/tools/gopls@(version) (not go get) for tool installation
The tools.go blank-import pattern is the recommended approach for version pinning
Use gopls check ./... for CI-friendly diagnostics (no LSP session needed)
GOFLAGS=-mod=mod gopls check for projects with unusual module configurations
Improvement Opportunities
🔴 Important Finding: gopls-version Field Is Parsed But Never Used
This is the most significant finding from this review.
The GoplsVersion field is parsed by parseSerenaTool() in tools_parser.go and stored in SerenaLangConfig, but it is never passed to any actual output. Here's why:
The original intent was to have GenerateSerenaLanguageServiceSteps() use it to install gopls on the host runner
Serena was later migrated to run inside a Docker container
GenerateSerenaLanguageServiceSteps() (runtime_step_generator.go:51) is now explicitly marked obsolete — it always returns an empty slice
The renderSerenaMCPConfigWithOptions() function that generates the actual Serena container config does not reference GoplsVersion at all
Impact: Users who configure gopls-version: in their workflow frontmatter get no benefit from it. The field is accepted without error, silently ignored.
Options:
A: Pass GoplsVersion as an environment variable GOPLS_VERSION to the Serena container (if the Serena container supports selecting gopls versions)
B: Deprecate the field in the schema and emit a warning when it is set
C: Document explicitly that gopls-version is a no-op in Docker mode (current default)
🟡 Quick Win: Outdated gopls-version Examples in Docs and Test Workflows
Three files use gopls-version: "v0.14.2" — which is 7 minor versions behind the current v0.21.1:
File
Current Value
Suggested
docs/src/content/docs/guides/serena.md:75
"v0.14.2"
"latest"
pkg/cli/workflows/test-serena-go-config.md:12
"v0.14.2"
"latest"
pkg/cli/workflows/test-serena-long.md:14
"v0.14.2"
"latest"
Since the field is currently a no-op anyway, using "latest" would be more accurate as an example.
🟡 Feature: Use gopls check in CI
gopls check (available since v0.19.0) runs Go diagnostics without a full LSP session — it's suitable for CI pipelines. Could be added to make golint or as a new make gopls-check target:
gopls check ./...
This can catch issues that go vet misses, and since gopls is already installed via make tools, there's no additional dependency.
🔵 Dead Code: GenerateSerenaLanguageServiceSteps Call Sites
The function is called in two places in compiler_yaml_main_job.go (lines 139, 538) but always returns an empty slice. These call sites add noise and could be cleaned up when the function is eventually removed.
Recommendations
Decide the fate of gopls-version: Either wire it up to actually do something (e.g., pass to Serena container as env var), or deprecate it with a schema warning. The current state — silently parsed and ignored — is a subtle UX issue.
Update stale docs examples: Change gopls-version: "v0.14.2" → "latest" in 3 files. Low-effort, high-clarity improvement.
Consider adding gopls check to CI: Now that gopls is already pinned and installed, gopls check is a free diagnostic improvement available on every developer machine and CI run.
Track dead code: GenerateSerenaLanguageServiceSteps and its call sites are clearly obsolete. Track for cleanup in a future housekeeping PR.
Next Steps
Resolve gopls-version field lifecycle (wire up, deprecate, or document as no-op)
Update 3 documentation files from v0.14.2 → "latest"
Evaluate adding gopls check ./... to linting targets
Remove GenerateSerenaLanguageServiceSteps call sites when appropriate
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
🐹 Go Fan — gopls Review
Today's module is
golang.org/x/tools/gopls— the official Go language server. This module was selected because it had the most recent commit activity (golang/toolswas last pushed 2026-02-19, the most recently updated direct dependency).Module Overview
goplsis Go's official Language Server Protocol (LSP) implementation, maintained by the Go team. It provides IDE features: code completion, go-to-definition, find-references, hover documentation, formatting, and diagnostics.go.mod:v0.21.1(latest release — ✅ up to date)gopls/v0.21.1(2026-02-12) — bugfix forgolang/go#77260, references broken when highlighting function namesCurrent Usage in gh-aw
goplsplays two distinct roles in this repository:Role 1: Developer Tool (Version Pinning)
tools.go:12,Makefile:400_ "golang.org/x/tools/gopls")//go:build toolsbuild taggo install golang.org/x/tools/gopls@v0.21.1viamake toolsThis is the canonical Go pattern for version-pinning development tools. All contributors install the exact same gopls version, ensuring consistent LSP behavior across environments.
Role 2: Serena Workflow Configuration Schema
pkg/workflow/tools_types.go:310,pkg/workflow/tools_parser.go:404-405GoplsVersion string \yaml:"gopls-version,omitempty"`onSerenaLangConfig`parseSerenaTool()readsgopls-versionfrom workflow frontmatterUsers can specify
gopls-versionin their workflow YAML:Research Findings
Recent Updates (v0.19–v0.21)
importsSourcedefault back togoimportsafter bug #74280gopls checksubcommand with-severityflagBest Practices from Maintainers
go install golang.org/x/tools/gopls@(version)(notgo get) for tool installationtools.goblank-import pattern is the recommended approach for version pinninggopls check ./...for CI-friendly diagnostics (no LSP session needed)GOFLAGS=-mod=mod gopls checkfor projects with unusual module configurationsImprovement Opportunities
🔴 Important Finding:
gopls-versionField Is Parsed But Never UsedThis is the most significant finding from this review.
The
GoplsVersionfield is parsed byparseSerenaTool()intools_parser.goand stored inSerenaLangConfig, but it is never passed to any actual output. Here's why:GenerateSerenaLanguageServiceSteps()use it to install gopls on the host runnerGenerateSerenaLanguageServiceSteps()(runtime_step_generator.go:51) is now explicitly marked obsolete — it always returns an empty slicerenderSerenaMCPConfigWithOptions()function that generates the actual Serena container config does not referenceGoplsVersionat allImpact: Users who configure
gopls-version:in their workflow frontmatter get no benefit from it. The field is accepted without error, silently ignored.Options:
GoplsVersionas an environment variableGOPLS_VERSIONto the Serena container (if the Serena container supports selecting gopls versions)gopls-versionis a no-op in Docker mode (current default)🟡 Quick Win: Outdated
gopls-versionExamples in Docs and Test WorkflowsThree files use
gopls-version: "v0.14.2"— which is 7 minor versions behind the currentv0.21.1:docs/src/content/docs/guides/serena.md:75"v0.14.2""latest"pkg/cli/workflows/test-serena-go-config.md:12"v0.14.2""latest"pkg/cli/workflows/test-serena-long.md:14"v0.14.2""latest"Since the field is currently a no-op anyway, using
"latest"would be more accurate as an example.🟡 Feature: Use
gopls checkin CIgopls check(available since v0.19.0) runs Go diagnostics without a full LSP session — it's suitable for CI pipelines. Could be added tomake golintor as a newmake gopls-checktarget:This can catch issues that
go vetmisses, and since gopls is already installed viamake tools, there's no additional dependency.🔵 Dead Code:
GenerateSerenaLanguageServiceStepsCall SitesThe function is called in two places in
compiler_yaml_main_job.go(lines 139, 538) but always returns an empty slice. These call sites add noise and could be cleaned up when the function is eventually removed.Recommendations
Decide the fate of
gopls-version: Either wire it up to actually do something (e.g., pass to Serena container as env var), or deprecate it with a schema warning. The current state — silently parsed and ignored — is a subtle UX issue.Update stale docs examples: Change
gopls-version: "v0.14.2"→"latest"in 3 files. Low-effort, high-clarity improvement.Consider adding
gopls checkto CI: Now that gopls is already pinned and installed,gopls checkis a free diagnostic improvement available on every developer machine and CI run.Track dead code:
GenerateSerenaLanguageServiceStepsand its call sites are clearly obsolete. Track for cleanup in a future housekeeping PR.Next Steps
gopls-versionfield lifecycle (wire up, deprecate, or document as no-op)v0.14.2→"latest"gopls check ./...to linting targetsGenerateSerenaLanguageServiceStepscall sites when appropriateReferences:
Module summary saved to:
scratchpad/mods/golang-x-tools-gopls.mdGenerated by Go Fan — round-robin state saved to cache
Beta Was this translation helpful? Give feedback.
All reactions