Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
findleyr opened this issue Feb 29, 2024 · 1 comment
Open

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

findleyr opened this issue Feb 29, 2024 · 1 comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@findleyr
Copy link
Contributor

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

@findleyr findleyr added this to the gopls/v0.16.0 milestone Feb 29, 2024
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Feb 29, 2024
@adonovan
Copy link
Member

or we remove the PATH lookup from go/packages, though that would require more analysis.

I think we should do that too.

@findleyr findleyr modified the milestones: gopls/v0.16.0, gopls/v0.15.2 Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants