Skip to content

x/tools/gopls: don't access the network for go mod tidy diagnostics #38462

Closed
@stamblerre

Description

@stamblerre

A few reports of issues with gopls when the user has no internet (one on Slack, one on microsoft/vscode-go#3105).

I wonder if there is a way we can have a regression test this - maybe by configuring something in the environment? @findleyr

Activity

added this to the gopls/v0.5.0 milestone on Apr 15, 2020
added
ToolsThis label describes issues relating to any tools in the x/tools repository.
goplsIssues related to the Go language server, gopls.
on Apr 15, 2020
findleyr

findleyr commented on Apr 15, 2020

@findleyr
Member

Following https://golang.org/cl/228235, the regtests use a proxy within our control. If we have examples of how gopls breaks without a network connection, we should be able to reproduce.

mingoal

mingoal commented on Apr 15, 2020

@mingoal

@findleyr
suggest scenario:
in go file, include one package which has no local cache,

  1. without network connection, will gopls hang or not?
  2. with network connection which requires http proxy, will gopls hang or not?
self-assigned this
on Sep 3, 2020
added
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
on Sep 25, 2020
gopherbot

gopherbot commented on Nov 30, 2020

@gopherbot
Contributor

Change https://golang.org/cl/274120 mentions this issue: internal/lsp: disable network access for some go commands

1 remaining item

stamblerre

stamblerre commented on Dec 6, 2020

@stamblerre
ContributorAuthor

I believe the only remaining task here is to remove network access for the go mod tidy diagnostics.

@heschik, is there anything else I'm missing?

heschi

heschi commented on Dec 8, 2020

@heschi
Contributor

That's it as far as I know.

changed the title [-]x/tools/gopls: make sure gopls works without network connection[/-] [+]x/tools/gopls: don't access the network for `go mod tidy` diagnostics[/+] on Dec 8, 2020
gopherbot

gopherbot commented on Feb 5, 2021

@gopherbot
Contributor

Change https://golang.org/cl/289309 mentions this issue: internal/lsp/cache: disable network for mod tidy diagnostics

locked and limited conversation to collaborators on Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.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

        Participants

        @stamblerre@gopherbot@mingoal@heschi@findleyr

        Issue actions

          x/tools/gopls: don't access the network for `go mod tidy` diagnostics · Issue #38462 · golang/go