-
Notifications
You must be signed in to change notification settings - Fork 646
use the user's GOPROXY settings when requesting the gopls version #2774
Conversation
After some discussion with teammates, this is the correct approach for the |
src/goLanguageServer.ts
Outdated
return null; | ||
} | ||
|
||
async function goProxy(): Promise<string[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We plan to do this not more than once per each VS Code session right?
If so, then on start up, we do run go env GOPATH GOROOT
.
We can append GOPROXY to that and have the value stored in process.env['GOPROXY']
and skip the below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe re-using that go env
call is a good move. If you agree, you can cherry pick this commit of mine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
I think this change, in conjunction with the setting to disable
gopls
automatic updates might be enough to solve the issue with making requests directly.