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: Default setting of GOPROXY=off causes problems with downloading modules #53313

Open
Jefftree opened this issue Jun 9, 2022 · 5 comments
Labels
gopls Tools WaitingForInfo
Milestone

Comments

@Jefftree
Copy link

@Jefftree Jefftree commented Jun 9, 2022

gopls version

golang.org/x/tools/gopls v0.7.5
    golang.org/x/tools/gopls@v0.7.5 h1:8Az52YwcFXTWPvrRomns1C0N+zlgTyyPKWvRazO9GG8=

go env

What did you do?

Hi, I recently upgraded from a gopls version from over a year ago (0.1.0). I was getting an error module lookup disabled by GOPROXY=off but my project (kubernetes) has no private repos. (It does use a mod file with replace directives and a vendor directory).

As a fix, I was able to fix the problem via toggling allowImplicitNetworkAccess, but it looks like this is not recommended. I'm not sure if this is a problem with my environment or the go.mod for Kubernetes (everything works smoothly for other repos).

Editor and settings

Emacs, using lsp-mode and gopls

Logs

@gopherbot gopherbot added Tools gopls labels Jun 9, 2022
@gopherbot gopherbot added this to the Unreleased milestone Jun 9, 2022
@jamalc
Copy link

@jamalc jamalc commented Jun 9, 2022

Is this a problem only when the mod file changes or during startup as well?

@jamalc jamalc added the WaitingForInfo label Jun 9, 2022
@Jefftree
Copy link
Author

@Jefftree Jefftree commented Jun 9, 2022

startup as well

@findleyr
Copy link
Contributor

@findleyr findleyr commented Jun 9, 2022

Hmm, the initial workspace load is supposed to allow network access.

Also: does go build succeed from the command line?

Could you share logs from your gopls session?
https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#capture-logs

@suzmue suzmue added WaitingForInfo and removed WaitingForInfo labels Jun 16, 2022
@rski
Copy link

@rski rski commented Jun 17, 2022

for what it's worth, NixOS/nixpkgs#177632 was diagnosed to be due to dns resolution issues. I will open another issue because the error ends up being misleading and that is a problem of itself, but maybe there are dns issues going on here too?

@dle8
Copy link

@dle8 dle8 commented Jun 23, 2022

@Jefftree: can you respond to @findleyr questions? Also is this the dns issue in your case like @rski mentioned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Tools WaitingForInfo
Projects
None yet
Development

No branches or pull requests

7 participants