Skip to content

x/tools/gopls: ignore gopackagesdriver in PATH #66041

@findleyr

Description

@findleyr

There special logic in go/packages to find an external driver from PATH: https://cs.opensource.google/go/x/tools/+/master:go/packages/external.go;l=101;drc=a987ef7aeab9e20797ce48cced2bceb815601f67

This logic continually causes problems for Googlers using gopls, because Google has an internal go/packages driver and certain gopls logic gives up when it encounters an external driver.

We should fix this once and for all. I propose that if GOPACKAGESDRIVER is not explicitly set, gopls sets GOPACKAGESDRIVER=off. Either that, or we remove the PATH lookup from go/packages, though that would require more analysis.

CC @adonovan

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