Skip to content

x/tools/gopls: warn if language version is newer than compile version #68258

Open
@findleyr

Description

@findleyr

As suggested by @matta in #68248, we should warn when the version of Go used to compile gopls is older than the language version implied by the go.mod file. A diagnostic on the go directive of the go.mod file probably suffices.

FWIW, I reported a similar issue in staticcheck. There, the fix to build with go1.23rc1 worked as well.

@dominikh also added code to staticcheck that will report an error if the tool is used on a go module requiring versions of go newer than what the tool was built with. gopls could consider a similar check.

Originally posted by @matta in #68248 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions