golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.55k stars 17.61k forks source link

x/tools/gopls: error loading workspace when go.mod is directly updated to include a new dependency #47538

Closed hyangah closed 2 years ago

hyangah commented 3 years ago

What version of Go/Gopls are you using (go version)?

$ go version
go1.16.6
$ gopls -v version
Build info
----------
golang.org/x/tools/gopls v0.7.1
    golang.org/x/tools/gopls@v0.7.1 h1:Mh3Z8Xcoq3Zy7ksSlwDV/nzQSbjFf06A+L+F8YHq55U=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/google/go-cmp@v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
    golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
    golang.org/x/sys@v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
    golang.org/x/tools@v0.1.6-0.20210802203754-9b21a8868e16 h1:ZC/gVBZl8poJyKzWLxxlsmhayVGosF4mohR35szD5Bg=
    golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
    honnef.co/go/tools@v0.2.0 h1:ws8AfbgTX3oIczLPNPCu5166oBg9ST2vNs0rcht+mDE=
    mvdan.cc/gofumpt@v0.1.1 h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=
    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
mac

What did you do?

What did you expect to see?

The new dependency is picked up automatically. Or gopls sends diagnostics with code actions or codelens that downloads the new dependency.

What did you see instead?

Stuck in workspace loading, without any action or helpful info to address the issue.

I found multiple ways to get out of this broken state, and would be nice if gopls suggests one of them or other:

The following is the gopls log -

gopls log
[Trace - 18:53:14.115 PM] Sending request 'initialize - (0)'.
Params: {"processId":6803,"clientInfo":{"name":"Visual Studio Code - Insiders","version":"1.59.0-insider"},"locale":"en-us","rootPath":"/Users/hakim/projects/google/vscode-go","rootUri":"file:///Users/hakim/projects/google/vscode-go","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotationSupport":{"groupsOnLabel":true}},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"codeLens":{"refreshSupport":true},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true,"semanticTokens":{"refreshSupport":true},"fileOperations":{"dynamicRegistration":true,"didCreate":true,"didRename":true,"didDelete":true,"willCreate":true,"willRename":true,"willDelete":true}},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]},"codeDescriptionSupport":true,"dataSupport":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"insertTextModeSupport":{"valueSet":[1,2]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true,"tagSupport":{"valueSet":[1]},"labelSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"disabledSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]},"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"honorsChangeAnnotations":false},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1,"honorsChangeAnnotations":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"requests":{"range":true,"full":{"delta":true}},"multilineTokenSupport":false,"overlappingTokenSupport":false},"linkedEditingRange":{"dynamicRegistration":true}},"window":{"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"showDocument":{"support":true},"workDoneProgress":true},"general":{"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"markdown":{"parser":"marked","version":"1.1.0"}}},"initializationOptions":{"verboseOutput":true},"trace":"verbose","workspaceFolders":[{"uri":"file:///Users/hakim/projects/google/vscode-go","name":"vscode-go"}]}

[Trace - 18:53:14.117 PM] Received response 'initialize - (0)' in 2ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."],"completionItem":{}},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":{"prepareProvider":true},"foldingRangeProvider":true,"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.apply_fix","gopls.check_upgrades","gopls.gc_details","gopls.generate","gopls.generate_gopls_mod","gopls.go_get_package","gopls.list_known_packages","gopls.regenerate_cgo","gopls.remove_dependency","gopls.run_tests","gopls.start_debugging","gopls.test","gopls.tidy","gopls.toggle_gc_details","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor","gopls.workspace_metadata"]},"callHierarchyProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"{\"path\":\"golang.org/x/tools/gopls\",\"version\":\"v0.7.1\",\"sum\":\"h1:Mh3Z8Xcoq3Zy7ksSlwDV/nzQSbjFf06A+L+F8YHq55U=\",\"deps\":[{\"path\":\"github.com/BurntSushi/toml\",\"version\":\"v0.3.1\",\"sum\":\"h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\"},{\"path\":\"github.com/google/go-cmp\",\"version\":\"v0.5.5\",\"sum\":\"h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=\"},{\"path\":\"github.com/sergi/go-diff\",\"version\":\"v1.1.0\",\"sum\":\"h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\"},{\"path\":\"golang.org/x/mod\",\"version\":\"v0.4.2\",\"sum\":\"h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=\"},{\"path\":\"golang.org/x/sync\",\"version\":\"v0.0.0-20210220032951-036812b2e83c\",\"sum\":\"h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=\"},{\"path\":\"golang.org/x/sys\",\"version\":\"v0.0.0-20210510120138-977fb7262007\",\"sum\":\"h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=\"},{\"path\":\"golang.org/x/tools\",\"version\":\"v0.1.6-0.20210802203754-9b21a8868e16\",\"sum\":\"h1:ZC/gVBZl8poJyKzWLxxlsmhayVGosF4mohR35szD5Bg=\"},{\"path\":\"golang.org/x/xerrors\",\"version\":\"v0.0.0-20200804184101-5ec99f83aff1\",\"sum\":\"h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=\"},{\"path\":\"honnef.co/go/tools\",\"version\":\"v0.2.0\",\"sum\":\"h1:ws8AfbgTX3oIczLPNPCu5166oBg9ST2vNs0rcht+mDE=\"},{\"path\":\"mvdan.cc/gofumpt\",\"version\":\"v0.1.1\",\"sum\":\"h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=\"},{\"path\":\"mvdan.cc/xurls/v2\",\"version\":\"v2.2.0\",\"sum\":\"h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=\"}]}"}}

[Trace - 18:53:14.152 PM] Sending notification 'initialized'.
Params: {}

[Trace - 18:53:14.153 PM] Received request 'window/workDoneProgress/create - (1)'.
Params: {"token":"5577006791947779410"}

[Trace - 18:53:14.153 PM] Sending notification 'textDocument/didOpen'.
Params: {...}}

[Trace - 18:53:14.171 PM] Sending response 'window/workDoneProgress/create - (1)' in 18ms.
Result: 

[Trace - 18:53:14.171 PM] Received notification '$/progress'.
Params: {"token":"5577006791947779410","value":{"kind":"begin","title":"Setting up workspace","message":"Loading packages..."}}

[Trace - 18:53:14.172 PM] Received request 'workspace/configuration - (2)'.
Params: {"items":[{"scopeUri":"file:///Users/hakim/projects/google/vscode-go","section":"gopls"}]}

[Trace - 18:53:14.230 PM] Sending response 'workspace/configuration - (2)' in 58ms.
Result: [{"verboseOutput":true}]

[Trace - 18:53:14.734 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:14 go env for /Users/hakim/projects/google/vscode-go\n(root /Users/hakim/projects/google/vscode-go)\n(go version go version go1.16.6 darwin/amd64)\n(valid build configuration = true)\n(build flags: [])\nGOMOD=/Users/hakim/projects/google/vscode-go/go.mod\nGOPATH=/Users/hakim/go\nGOSUMDB=sum.golang.org\nGOMODCACHE=/Users/hakim/go/pkg/mod\nGONOSUMDB=\nGOPROXY=https://proxy.golang.org,direct\nGOCACHE=/Users/hakim/Library/Caches/go-build\nGOFLAGS=\nGOINSECURE=\nGO111MODULE=\nGONOPROXY=\nGOPRIVATE=\nGOROOT=/Users/hakim/sdk/go1.16.6\n\n"}

[Trace - 18:53:14.758 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:14 31.492827ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=off GOPROXY=https://proxy.golang.org,direct PWD=/Users/hakim/projects/google/vscode-go go list -e -f {{context.ReleaseTags}} -- unsafe\n"}

[Trace - 18:53:14.763 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:14 49.655209ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=https://proxy.golang.org,direct PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.2881188682.mod -mod=readonly -f \"{{context.GOARCH}} {{context.Compiler}}\" -- unsafe\n"}

[Trace - 18:53:15.024 PM] Sending request 'textDocument/documentSymbol - (1)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:15.024 PM] Sending request 'textDocument/codeAction - (2)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"},"range":{"start":{"line":67,"character":12},"end":{"line":67,"character":12}},"context":{"diagnostics":[]}}

[Info  - 6:53:15 PM] 2021/08/04 18:53:14 go env for /Users/hakim/projects/google/vscode-go
(root /Users/hakim/projects/google/vscode-go)
(go version go version go1.16.6 darwin/amd64)
(valid build configuration = true)
(build flags: [])
GOMOD=/Users/hakim/projects/google/vscode-go/go.mod
GOPATH=/Users/hakim/go
GOSUMDB=sum.golang.org
GOMODCACHE=/Users/hakim/go/pkg/mod
GONOSUMDB=
GOPROXY=https://proxy.golang.org,direct
GOCACHE=/Users/hakim/Library/Caches/go-build
GOFLAGS=
GOINSECURE=
GO111MODULE=
GONOPROXY=
GOPRIVATE=
GOROOT=/Users/hakim/sdk/go1.16.6

[Trace - 18:53:15.038 PM] Sending request 'textDocument/documentLink - (3)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Info  - 6:53:15 PM] 2021/08/04 18:53:14 31.492827ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=off GOPROXY=https://proxy.golang.org,direct PWD=/Users/hakim/projects/google/vscode-go go list -e -f {{context.ReleaseTags}} -- unsafe

[Info  - 6:53:15 PM] 2021/08/04 18:53:14 49.655209ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=https://proxy.golang.org,direct PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.2881188682.mod -mod=readonly -f "{{context.GOARCH}} {{context.Compiler}}" -- unsafe

[Trace - 18:53:15.534 PM] Sending request 'textDocument/foldingRange - (4)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:15.534 PM] Sending request 'textDocument/codeLens - (5)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:17.563 PM] Sending request 'textDocument/documentLink - (6)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:17.914 PM] Sending notification '$/cancelRequest'.
Params: {"id":6}

[Trace - 18:53:17.914 PM] Sending request 'textDocument/documentLink - (7)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:17.915 PM] Sending notification '$/cancelRequest'.
Params: {"id":4}

[Trace - 18:53:18.142 PM] Sending request 'textDocument/foldingRange - (8)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:18.369 PM] Sending request 'textDocument/documentLink - (9)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:18.879 PM] Sending notification '$/cancelRequest'.
Params: {"id":5}

[Trace - 18:53:19.432 PM] Sending request 'textDocument/codeLens - (10)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:19.459 PM] Sending request 'textDocument/codeLens - (11)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:19.598 PM] Sending notification '$/cancelRequest'.
Params: {"id":9}

[Trace - 18:53:19.601 PM] Sending request 'textDocument/documentLink - (12)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:31.288 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 16.545495047s for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=https://proxy.golang.org,direct PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.2881188682.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- builtin github.com/golang/vscode-go/...\n"}

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 16.545495047s for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=https://proxy.golang.org,direct PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.2881188682.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- builtin github.com/golang/vscode-go/...

[Trace - 18:53:31.301 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 go/packages.Load\n\tsnapshot=0\n\tdirectory=/Users/hakim/projects/google/vscode-go\n\tquery=[builtin github.com/golang/vscode-go/...]\n\tpackages=6\n"}

[Trace - 18:53:31.301 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 go/packages.Load\n\tsnapshot=0\n\tpackage=\"github.com/golang/vscode-go/tools/goplssetting\"\n\tfiles=[/Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting.go]\n"}

[Trace - 18:53:31.301 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 go/packages.Load\n\tsnapshot=0\n\tpackage=\"builtin\"\n\tfiles=[/Users/hakim/sdk/go1.16.6/src/builtin/builtin.go]\n"}

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 go/packages.Load
    snapshot=0
    directory=/Users/hakim/projects/google/vscode-go
    query=[builtin github.com/golang/vscode-go/...]
    packages=6

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 go/packages.Load
    snapshot=0
    package="github.com/golang/vscode-go/tools/goplssetting"
    files=[/Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting.go]

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 go/packages.Load
    snapshot=0
    package="builtin"
    files=[/Users/hakim/sdk/go1.16.6/src/builtin/builtin.go]

[Trace - 18:53:31.343 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 go/packages.Load\n\tsnapshot=0\n\tpackage=\"github.com/golang/vscode-go/tools\"\n\tfiles=[/Users/hakim/projects/google/vscode-go/tools/generate.go]\n"}

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 go/packages.Load
    snapshot=0
    package="github.com/golang/vscode-go/tools"
    files=[/Users/hakim/projects/google/vscode-go/tools/generate.go]

[Trace - 18:53:31.344 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 go/packages.Load\n\tsnapshot=0\n\tpackage=\"github.com/golang/vscode-go/tools/relnotes\"\n\tfiles=[/Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go]\n"}

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 go/packages.Load
    snapshot=0
    package="github.com/golang/vscode-go/tools/relnotes"
    files=[/Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go]

[Trace - 18:53:31.425 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 go/packages.Load\n\tsnapshot=0\n\tpackage=\"github.com/golang/vscode-go/tools/goplssetting [github.com/golang/vscode-go/tools/goplssetting.test]\"\n\tfiles=[/Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting.go /Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting_test.go]\n"}

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 go/packages.Load
    snapshot=0
    package="github.com/golang/vscode-go/tools/goplssetting [github.com/golang/vscode-go/tools/goplssetting.test]"
    files=[/Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting.go /Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting_test.go]

[Trace - 18:53:31.426 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 go/packages.Load\n\tsnapshot=0\n\tpackage=\"github.com/golang/vscode-go/tools/goplssetting.test\"\n\tfiles=[/Users/hakim/Library/Caches/go-build/60/60a68027560e5f9bca6b2555391b981793f56c2ea1767d8c251375f05d47a5c3-d]\n"}

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 go/packages.Load
    snapshot=0
    package="github.com/golang/vscode-go/tools/goplssetting.test"
    files=[/Users/hakim/Library/Caches/go-build/60/60a68027560e5f9bca6b2555391b981793f56c2ea1767d8c251375f05d47a5c3-d]

[Trace - 18:53:31.431 PM] Received notification '$/progress'.
Params: {"token":"5577006791947779410","value":{"kind":"end","message":"Finished loading packages."}}

[Trace - 18:53:31.434 PM] Received request 'client/registerCapability - (3)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{go,mod,sum}","kind":7},{"globPattern":"**/*.*tmpl","kind":7},{"globPattern":"{/Users/hakim/projects/google/vscode-go/tools,/Users/hakim/projects/google/vscode-go/tools/goplssetting,/Users/hakim/projects/google/vscode-go/tools/relnotes}","kind":7}]}}]}

[Trace - 18:53:31.455 PM] Sending response 'client/registerCapability - (3)' in 21ms.
Result: 

[Trace - 18:53:31.460 PM] Received request 'client/registerCapability - (4)'.
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"}]}

[Trace - 18:53:31.468 PM] Sending response 'client/registerCapability - (4)' in 8ms.
Result: 

[Trace - 18:53:31.712 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 discovered missing identifiers: map[memRecordCycle:true pageBits:true]\n\tpackage=\"runtime\"\n"}

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 discovered missing identifiers: map[memRecordCycle:true pageBits:true]
    package="runtime"

[Trace - 18:53:31.831 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 discovered missing identifiers: map[cardinality:true kind:true syntax:true value:true]\n\tpackage=\"google.golang.org/protobuf/reflect/protoreflect\"\n"}

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 discovered missing identifiers: map[cardinality:true kind:true syntax:true value:true]
    package="google.golang.org/protobuf/reflect/protoreflect"

[Trace - 18:53:31.856 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 discovered missing identifiers: map[options:true]\n\tpackage=\"vendor/golang.org/x/text/unicode/bidi\"\n"}

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 discovered missing identifiers: map[options:true]
    package="vendor/golang.org/x/text/unicode/bidi"

[Trace - 18:53:31.869 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 falling back to safe trimming due to type errors: [/Users/hakim/sdk/go1.16.6/src/os/user/cgo_lookup_unix.go:198:19: int not declared by package C /Users/hakim/sdk/go1.16.6/src/os/user/cgo_lookup_unix.go:201:16: bufferKind(C._SC_GETPW_R_SIZE_MAX) (value of type bufferKind) is not constant /Users/hakim/sdk/go1.16.6/src/os/user/cgo_lookup_unix.go:202:16: bufferKind(C._SC_GETGR_R_SIZE_MAX) (value of type bufferKind) is not constant] or still-missing identifiers: map[]\n\tpackage=\"os/user\"\n"}

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 falling back to safe trimming due to type errors: [/Users/hakim/sdk/go1.16.6/src/os/user/cgo_lookup_unix.go:198:19: int not declared by package C /Users/hakim/sdk/go1.16.6/src/os/user/cgo_lookup_unix.go:201:16: bufferKind(C._SC_GETPW_R_SIZE_MAX) (value of type bufferKind) is not constant /Users/hakim/sdk/go1.16.6/src/os/user/cgo_lookup_unix.go:202:16: bufferKind(C._SC_GETGR_R_SIZE_MAX) (value of type bufferKind) is not constant] or still-missing identifiers: map[]
    package="os/user"

[Trace - 18:53:31.965 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:31 discovered missing identifiers: map[service:true]\n\tpackage=\"github.com/google/go-github/github\"\n"}

[Info  - 6:53:31 PM] 2021/08/04 18:53:31 discovered missing identifiers: map[service:true]
    package="github.com/google/go-github/github"

[Trace - 18:53:32.046 PM] Received response 'textDocument/documentSymbol - (1)' in 17021ms.
Result: [{...}]

[Trace - 18:53:32.048 PM] Received response 'textDocument/codeAction - (2)' in 17023ms.
Result: null

[Trace - 18:53:32.050 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:32 fixImports(filename=\"/Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go\"), abs=\"/Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go\", srcDir=\"/Users/hakim/projects/google/vscode-go/tools/relnotes\" ...\n"}

[Trace - 18:53:32.052 PM] Received response 'textDocument/documentLink - (3)' in 17014ms.
Result: [{...}]

[Error - Received] 18:53:32.052 PM #4 JSON RPC cancelled

[Error - Received] 18:53:32.052 PM #5 JSON RPC cancelled

[Error - Received] 18:53:32.052 PM #6 JSON RPC cancelled

[Info  - 6:53:32 PM] 2021/08/04 18:53:32 fixImports(filename="/Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"), abs="/Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go", srcDir="/Users/hakim/projects/google/vscode-go/tools/relnotes" ...

[Trace - 18:53:32.056 PM] Received response 'textDocument/documentLink - (7)' in 14141ms.
Result: [{...}]

[Trace - 18:53:32.067 PM] Received response 'textDocument/foldingRange - (8)' in 13925ms.
Result: [{...}]

[Error - Received] 18:53:32.068 PM #9 JSON RPC cancelled

[Trace - 18:53:32.068 PM] Received response 'textDocument/codeLens - (10)' in 12636ms.
Result: null

[Trace - 18:53:32.068 PM] Received response 'textDocument/codeLens - (11)' in 12609ms.
Result: null

[Trace - 18:53:32.070 PM] Received response 'textDocument/documentLink - (12)' in 12470ms.
Result: [{...}]

* Now I ran `git fetch`.
[Trace - 18:53:48.172 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go","version":2},"contentChanges":[{"range":{"start":{"line":22,"character":0},"end":{"line":296,"character":0}},"rangeLength":7095,"text":"\t\"github.com/stamblerre/work-stats/generic\"\n\t\"github.com/stamblerre/work-stats/golang\"\n\t\"golang.org/x/build/maintner\"\n\t\"golang.org/x/build/maintner/godata\"\n)\n\nvar (\n\tmilestone  = flag.String(\"milestone\", \"\", \"milestone associated with the release\")\n\tfilterDirs = flag.String(\"dirs\", \"\", \"comma-separated list of directories that should be touched for a CL to be considered relevant\")\n\tsinceCL    = flag.Int(\"cl\", -1, \"the gerrit change number of the first CL to include in the output. Only changes submitted more recently than 'cl' will be included.\")\n\tproject    = flag.String(\"project\", \"vscode-go\", \"name of the golang project\")\n\tmdMode     = flag.Bool(\"md\", false, \"write MD output\")\n\texclFile   = flag.String(\"exclude-from\", \"\", \"optional path to changelog MD file. If specified, any 'CL NNNN' occurence in the content will cause that CL to be excluded from this tool's output.\")\n)\n\nfunc main() {\n\tflag.Parse()\n\n\tvar existingMD []byte\n\tif *exclFile != \"\" {\n\t\tvar err error\n\t\texistingMD, err = ioutil.ReadFile(*exclFile)\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t}\n\n\tcorpus, err := godata.Get(context.Background())\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tvar dirs []string\n\tfor _, dir := range strings.FieldsFunc(*filterDirs, func(r rune) bool {\n\t\treturn unicode.IsSpace(r) || r == ','\n\t}) {\n\t\tdirs = append(dirs, filepath.ToSlash(dir))\n\t}\n\n\tger := corpus.Gerrit()\n\n\t// Find the cutoff time for changes to include.\n\tstart := time.Date(2020, time.August, 1, 00, 00, 00, 0, time.UTC)\n\tger.ForeachProjectUnsorted(func(gp *maintner.GerritProject) error {\n\t\tif gp.Server() != \"go.googlesource.com\" || gp.Project() != *project {\n\t\t\treturn nil\n\t\t}\n\t\tgp.ForeachCLUnsorted(func(cl *maintner.GerritCL) error {\n\t\t\tif cl.Status != \"merged\" {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tif *sinceCL >= 0 {\n\t\t\t\tif int(cl.Number) == *sinceCL {\n\t\t\t\t\tstart = cl.Commit.CommitTime\n\t\t\t\t}\n\t\t\t} else if cl.Branch() == \"release\" && cl.Commit.CommitTime.After(start) {\n\t\t\t\t// Try to figure out when the last release was\n\t\t\t\tfmt.Println(cl.Commit.CommitTime)\n\t\t\t\tstart = cl.Commit.CommitTime\n\t\t\t}\n\t\t\treturn nil\n\t\t})\n\t\treturn nil\n\t})\n\n\tvar changes []*generic.Changelist\n\tauthors := map[*maintner.GitPerson]bool{}\n\tger.ForeachProjectUnsorted(func(gp *maintner.GerritProject) error {\n\t\tif gp.Server() != \"go.googlesource.com\" || gp.Project() != *project {\n\t\t\treturn nil\n\t\t}\n\t\tgp.ForeachCLUnsorted(func(cl *maintner.GerritCL) error {\n\t\t\t// Only include 'master'\n\t\t\tif cl.Branch() != \"master\" {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tif cl.Status != \"merged\" {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tif cl.Commit.CommitTime.Before(start) {\n\t\t\t\t// Was in a previous release; not for this one.\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\tif bytes.Contains(existingMD, []byte(fmt.Sprintf(\"CL %d \", cl.Number))) {\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\t// Check that at least one file is in a relevant directory before\n\t\t\t// adding the CL.\n\t\t\tif len(dirs) > 0 {\n\t\t\t\tvar found bool\n\t\t\t\tfor _, file := range cl.Commit.Files {\n\t\t\t\t\tfor _, dir := range dirs {\n\t\t\t\t\t\tif strings.Contains(file.File, dir) {\n\t\t\t\t\t\t\tfound = true\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif !found {\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t}\n\t\t\tchanges = append(changes, golang.GerritToGenericCL(cl))\n\t\t\tauthors[cl.Owner()] = true\n\t\t\treturn nil\n\t\t})\n\t\treturn nil\n\t})\n\n\tsort.Slice(changes, func(i, j int) bool {\n\t\treturn changes[i].Number < changes[j].Number\n\t})\n\n\tif *mdMode {\n\t\tfmt.Printf(\"## TODO: version - \")\n\t\tnow := time.Now()\n\t\tfmt.Printf(\"%s\\n\\n\", now.Format(\"2 Jan, 2006\"))\n\t\tfmt.Printf(\"### Changes\\n\\n\")\n\t\tmdPrintChanges(changes, true)\n\n\t\tfmt.Printf(\"### Issues\\n\\n\")\n\t\tmdPrintIssues(changes, *milestone)\n\n\t\tfmt.Printf(\"\\n### Thanks\\n\\n\")\n\t\tmdPrintContributors(authors)\n\t} else {\n\t\tfor _, change := range changes {\n\t\t\tfmt.Printf(\"  %s\\n\", change.Subject)\n\t\t}\n\t}\n}\n\nfunc mdPrintChanges(changes []*generic.Changelist, byCategory bool) {\n\tprintChange := func(change *generic.Changelist) {\n\t\tfmt.Printf(\"- \")\n\t\tcontent := change.Subject\n\t\tnote := releaseNote(change)\n\t\tif note != \"\" && note != \"yes\" && note != \"y\" {\n\t\t\t// The release note contains content.\n\t\t\tcontent = note\n\t\t}\n\n\t\tfmt.Printf(\"%s\", content)\n\t\tif len(change.AssociatedIssues) > 0 {\n\t\t\tfmt.Printf(\" (\")\n\t\t\tfor i, issue := range change.AssociatedIssues {\n\t\t\t\tif i == 0 {\n\t\t\t\t\tfmt.Printf(\"[Issue %d](%s)\", issue.Number, issue.Link)\n\t\t\t\t} else {\n\t\t\t\t\tfmt.Printf(\", [%d](%s)\", issue.Number, issue.Link)\n\t\t\t\t}\n\t\t\t}\n\t\t\tfmt.Printf(\")\")\n\t\t}\n\t\tfmt.Printf(\" \\n\", change.Number)\n\t}\n\t// Group CLs by category or by number order.\n\tif byCategory {\n\t\tpkgMap := map[string][]*generic.Changelist{}\n\t\tfor _, change := range changes {\n\t\t\tpkgMap[change.Category()] = append(pkgMap[change.Category()], change)\n\t\t}\n\t\tfor _, changes := range pkgMap {\n\t\t\tfor _, change := range changes {\n\t\t\t\tprintChange(change)\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor _, change := range changes {\n\t\t\tprintChange(change)\n\t\t}\n\t}\n}\n\nfunc mdPrintIssues(changes []*generic.Changelist, milestone string) {\n\tvar issues []*generic.Issue\n\tfor _, change := range changes {\n\t\tissues = append(issues, change.AssociatedIssues...)\n\t}\n\tsort.Slice(issues, func(i, j int) bool {\n\t\treturn issues[i].Link < issues[j].Link\n\t})\n\tfor _, issue := range issues {\n\t\tif !issue.Closed() {\n\t\t\tcontinue\n\t\t}\n\t\tfmt.Printf(\"%s: %s\\n\", issue.Link, issue.Milestone)\n\t}\n}\n\n// clPackage returns the package name from the CL's commit message,\n// or \"??\" if it's formatted unconventionally.\nfunc clPackage(cl *maintner.GerritCL) string {\n\tsubj := cl.Subject()\n\tif i := strings.Index(subj, \":\"); i != -1 {\n\t\treturn subj[:i]\n\t}\n\treturn \"??\"\n}\n\nvar relNoteRx = regexp.MustCompile(`RELNOTES?=(.+)`)\n\nfunc parseRelNote(s string) string {\n\tif m := relNoteRx.FindStringSubmatch(s); m != nil {\n\t\treturn m[1]\n\t}\n\treturn \"\"\n}\n\nfunc releaseNote(cl *generic.Changelist) string {\n\tif strings.Contains(cl.Message, \"RELNOTE\") {\n\t\treturn parseRelNote(cl.Message)\n\t}\n\tfor _, comment := range cl.Comments {\n\t\tif strings.Contains(comment, \"RELNOTE\") {\n\t\t\treturn parseRelNote(comment)\n\t\t}\n\t}\n\treturn \"\"\n}\n\nfunc mdPrintContributors(authors map[*maintner.GitPerson]bool) {\n\tvar names []string\n\tfor author := range authors {\n\t\t// It would be great to look up the GitHub username by using:\n\t\t// https://pkg.go.dev/golang.org/x/build/internal/gophers#GetPerson.\n"}]}

[Trace - 18:53:48.206 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:48 22.419353ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=off GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -e -f {{context.ReleaseTags}} -- unsafe\n"}

[Info  - 6:53:48 PM] 2021/08/04 18:53:48 22.419353ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=off GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -e -f {{context.ReleaseTags}} -- unsafe

[Trace - 18:53:48.357 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:48 176.817281ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.1807217489.mod -mod=readonly -f \"{{context.GOARCH}} {{context.Compiler}}\" -- unsafe\n"}

[Info  - 6:53:48 PM] 2021/08/04 18:53:48 176.817281ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.1807217489.mod -mod=readonly -f "{{context.GOARCH}} {{context.Compiler}}" -- unsafe

[Trace - 18:53:48.379 PM] Sending request 'textDocument/foldingRange - (13)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:48.390 PM] Received response 'textDocument/foldingRange - (13)' in 11ms.
Result: [{...}]

[Trace - 18:53:48.410 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {"changes":[{"uri":"file:///Users/hakim/projects/google/vscode-go/go.mod","type":2},{"uri":"file:///Users/hakim/projects/google/vscode-go/go.sum","type":2},{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go","type":2}]}

[Trace - 18:53:48.421 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:48 217.177757ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.1807217489.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- /Users/hakim/projects/google/vscode-go/tools/relnotes\n"}

[Info  - 6:53:48 PM] 2021/08/04 18:53:48 217.177757ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.1807217489.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- /Users/hakim/projects/google/vscode-go/tools/relnotes

[Trace - 18:53:48.444 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:48 14.264481ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=off GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -e -f {{context.ReleaseTags}} -- unsafe\n"}

[Info  - 6:53:48 PM] 2021/08/04 18:53:48 14.264481ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=off GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -e -f {{context.ReleaseTags}} -- unsafe

[Trace - 18:53:48.446 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:48 16.761442ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.4146129579.mod -mod=readonly -f \"{{context.GOARCH}} {{context.Compiler}}\" -- unsafe\n"}

[Info  - 6:53:48 PM] 2021/08/04 18:53:48 16.761442ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.4146129579.mod -mod=readonly -f "{{context.GOARCH}} {{context.Compiler}}" -- unsafe

[Trace - 18:53:48.463 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:48 17.154868ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.4146129579.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- /Users/hakim/projects/google/vscode-go/tools/relnotes\n"}

[Info  - 6:53:48 PM] 2021/08/04 18:53:48 17.154868ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.4146129579.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- /Users/hakim/projects/google/vscode-go/tools/relnotes

[Trace - 18:53:48.478 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:48 13.270385ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.4146129579.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- /Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go\n"}

[Trace - 18:53:48.480 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 18:53:48 go/packages.Load: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off\n\n\tsnapshot=3\n\tdirectory=/Users/hakim/projects/google/vscode-go\n\tquery=[file=/Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go]\n\tpackages=0\n"}

[Info  - 6:53:48 PM] 2021/08/04 18:53:48 13.270385ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.4146129579.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- /Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go

[Error - 6:53:48 PM] 2021/08/04 18:53:48 go/packages.Load: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off

    snapshot=3
    directory=/Users/hakim/projects/google/vscode-go
    query=[file=/Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go]
    packages=0

[Trace - 18:53:48.755 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:48 14.869644ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=off GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -e -f {{context.ReleaseTags}} -- unsafe\n"}

[Info  - 6:53:48 PM] 2021/08/04 18:53:48 14.869644ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=off GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -e -f {{context.ReleaseTags}} -- unsafe

[Trace - 18:53:48.755 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:48 15.264557ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.4275863688.mod -mod=readonly -f \"{{context.GOARCH}} {{context.Compiler}}\" -- unsafe\n"}

[Info  - 6:53:48 PM] 2021/08/04 18:53:48 15.264557ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.4275863688.mod -mod=readonly -f "{{context.GOARCH}} {{context.Compiler}}" -- unsafe

[Trace - 18:53:48.771 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:53:48 15.607766ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.4275863688.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- builtin github.com/golang/vscode-go/...\n"}

[Info  - 6:53:48 PM] 2021/08/04 18:53:48 15.607766ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.4275863688.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- builtin github.com/golang/vscode-go/...

[Trace - 18:53:48.772 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 18:53:48 go/packages.Load: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off\n\n\tsnapshot=3\n\tdirectory=/Users/hakim/projects/google/vscode-go\n\tquery=[builtin github.com/golang/vscode-go/...]\n\tpackages=0\n"}

[Error - 6:53:48 PM] 2021/08/04 18:53:48 go/packages.Load: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off

    snapshot=3
    directory=/Users/hakim/projects/google/vscode-go
    query=[builtin github.com/golang/vscode-go/...]
    packages=0

[Trace - 18:53:48.772 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 18:53:48 initial workspace load failed: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off\n: packages.Load error\n"}

[Error - 6:53:48 PM] 2021/08/04 18:53:48 initial workspace load failed: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off
: packages.Load error

[Trace - 18:53:48.774 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 18:53:48 workspace packages: diagnosing file:///Users/hakim/projects/google/vscode-go/go.mod: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off\n: packages.Load error\n"}

[Error - 6:53:48 PM] 2021/08/04 18:53:48 workspace packages: diagnosing file:///Users/hakim/projects/google/vscode-go/go.mod: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off
: packages.Load error

[Trace - 18:53:49.163 PM] Sending request 'textDocument/documentLink - (14)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:49.178 PM] Received response 'textDocument/documentLink - (14)' in 14ms.
Result: [{...}]

[Trace - 18:53:49.704 PM] Received request 'window/workDoneProgress/create - (5)'.
Params: {"token":"8674665223082153551"}

[Trace - 18:53:49.704 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 18:53:49 errors loading workspace: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off\n: packages.Load error\n\tsnapshot=3\n\tdirectory=file:///Users/hakim/projects/google/vscode-go\n"}

[Error - 6:53:49 PM] 2021/08/04 18:53:49 errors loading workspace: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off
: packages.Load error
    snapshot=3
    directory=file:///Users/hakim/projects/google/vscode-go

[Trace - 18:53:49.705 PM] Sending response 'window/workDoneProgress/create - (5)' in 1ms.
Result: 

[Trace - 18:53:49.705 PM] Received notification '$/progress'.
Params: {"token":"8674665223082153551","value":{"kind":"begin","title":"Error loading workspace","message":"err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off : packages.Load error"}}

[Trace - 18:53:49.705 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/hakim/projects/google/vscode-go/go.mod","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":34}},"severity":1,"source":"go list","message":"err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off\n: packages.Load error"}]}

[Trace - 18:53:50.672 PM] Sending request 'textDocument/codeLens - (15)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:50.673 PM] Received response 'textDocument/codeLens - (15)' in 1ms.
Result: null

[Trace - 18:53:50.676 PM] Sending request 'textDocument/codeLens - (16)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:50.676 PM] Sending request 'textDocument/documentSymbol - (17)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"}}

[Trace - 18:53:50.676 PM] Received response 'textDocument/codeLens - (16)' in 0ms.
Result: null

[Trace - 18:53:50.677 PM] Received response 'textDocument/documentSymbol - (17)' in 0ms.
Result: [{...}]

[Trace - 18:54:02.090 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:02 15.415608ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go env -json GO111MODULE GOFLAGS GOINSECURE GOMOD GOMODCACHE GONOPROXY GONOSUMDB GOPATH GOPROXY GOROOT GOSUMDB\n"}

[Info  - 6:54:02 PM] 2021/08/04 18:54:02 15.415608ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go env -json GO111MODULE GOFLAGS GOINSECURE GOMOD GOMODCACHE GONOPROXY GONOSUMDB GOPATH GOPROXY GOROOT GOSUMDB

[Trace - 18:54:02.092 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:02 background imports cache refresh starting\n"}

[Info  - 6:54:02 PM] 2021/08/04 18:54:02 background imports cache refresh starting

[Trace - 18:54:02.189 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:02 96.209801ms for GOROOT=/Users/hakim/sdk/go1.16.6 GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.942536254.mod -mod=readonly -m -f \"{{.Path}}\\n{{.Dir}}\\n{{.GoMod}}\\n{{.GoVersion}}\\n{{range context.ReleaseTags}}{{if eq . \\\"go1.14\\\"}}{{.}}{{end}}{{end}}\\n\"\n"}

[Info  - 6:54:02 PM] 2021/08/04 18:54:02 96.209801ms for GOROOT=/Users/hakim/sdk/go1.16.6 GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.942536254.mod -mod=readonly -m -f "{{.Path}}\n{{.Dir}}\n{{.GoMod}}\n{{.GoVersion}}\n{{range context.ReleaseTags}}{{if eq . \"go1.14\"}}{{.}}{{end}}{{end}}\n"

[Trace - 18:54:02.207 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:02 14.934502ms for GOROOT=/Users/hakim/sdk/go1.16.6 GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go env GOFLAGS\n"}

[Info  - 6:54:02 PM] 2021/08/04 18:54:02 14.934502ms for GOROOT=/Users/hakim/sdk/go1.16.6 GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go env GOFLAGS

[Trace - 18:54:02.229 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:02 21.223897ms for GOROOT=/Users/hakim/sdk/go1.16.6 GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -m -e -json ...\n"}

[Trace - 18:54:02.230 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:02 background refresh finished after 158.089005ms: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off\n\n"}

[Info  - 6:54:02 PM] 2021/08/04 18:54:02 21.223897ms for GOROOT=/Users/hakim/sdk/go1.16.6 GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -m -e -json ...

[Info  - 6:54:02 PM] 2021/08/04 18:54:02 background refresh finished after 158.089005ms: err: exit status 1: stderr: go: github.com/stamblerre/work-stats@v0.0.0-20210726215650-a14fc877fae7: module lookup disabled by GOPROXY=off

[Trace - 18:54:57.318 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {"changes":[{"uri":"file:///Users/hakim/projects/google/vscode-go/go.sum","type":2}]}

[Trace - 18:54:57.604 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:57 17.112973ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=off GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -e -f {{context.ReleaseTags}} -- unsafe\n"}

[Info  - 6:54:57 PM] 2021/08/04 18:54:57 17.112973ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=off GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -e -f {{context.ReleaseTags}} -- unsafe

[Trace - 18:54:57.676 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:57 90.590232ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.682507636.mod -mod=readonly -f \"{{context.GOARCH}} {{context.Compiler}}\" -- unsafe\n"}

[Info  - 6:54:57 PM] 2021/08/04 18:54:57 90.590232ms for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.682507636.mod -mod=readonly -f "{{context.GOARCH}} {{context.Compiler}}" -- unsafe

[Trace - 18:54:59.200 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:59 1.597049496s for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.682507636.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- builtin github.com/golang/vscode-go/...\n"}

[Info  - 6:54:59 PM] 2021/08/04 18:54:59 1.597049496s for GOROOT= GOPATH=/Users/hakim/go GO111MODULE=auto GOPROXY=off PWD=/Users/hakim/projects/google/vscode-go go list -modfile=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/go.db5eccd4f280859c12cae76647b6f1cb9a5a3bf3ab805090944248e9016b96f3.682507636.mod -mod=readonly -e -json -compiled=true -test=true -export=false -deps=true -find=false -- builtin github.com/golang/vscode-go/...

[Trace - 18:54:59.215 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:59 go/packages.Load\n\tsnapshot=4\n\tpackage=\"builtin\"\n\tfiles=[/Users/hakim/sdk/go1.16.6/src/builtin/builtin.go]\n"}

[Trace - 18:54:59.215 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:59 go/packages.Load\n\tsnapshot=4\n\tdirectory=/Users/hakim/projects/google/vscode-go\n\tquery=[builtin github.com/golang/vscode-go/...]\n\tpackages=6\n"}

[Info  - 6:54:59 PM] 2021/08/04 18:54:59 go/packages.Load
    snapshot=4
    package="builtin"
    files=[/Users/hakim/sdk/go1.16.6/src/builtin/builtin.go]

[Trace - 18:54:59.215 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:59 go/packages.Load\n\tsnapshot=4\n\tpackage=\"github.com/golang/vscode-go/tools/goplssetting\"\n\tfiles=[/Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting.go]\n"}

[Info  - 6:54:59 PM] 2021/08/04 18:54:59 go/packages.Load
    snapshot=4
    directory=/Users/hakim/projects/google/vscode-go
    query=[builtin github.com/golang/vscode-go/...]
    packages=6

[Info  - 6:54:59 PM] 2021/08/04 18:54:59 go/packages.Load
    snapshot=4
    package="github.com/golang/vscode-go/tools/goplssetting"
    files=[/Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting.go]

[Trace - 18:54:59.221 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:59 go/packages.Load\n\tsnapshot=4\n\tpackage=\"github.com/golang/vscode-go/tools\"\n\tfiles=[/Users/hakim/projects/google/vscode-go/tools/generate.go]\n"}

[Info  - 6:54:59 PM] 2021/08/04 18:54:59 go/packages.Load
    snapshot=4
    package="github.com/golang/vscode-go/tools"
    files=[/Users/hakim/projects/google/vscode-go/tools/generate.go]

[Trace - 18:54:59.221 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:59 go/packages.Load\n\tsnapshot=4\n\tpackage=\"github.com/golang/vscode-go/tools/relnotes\"\n\tfiles=[/Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go]\n"}

[Info  - 6:54:59 PM] 2021/08/04 18:54:59 go/packages.Load
    snapshot=4
    package="github.com/golang/vscode-go/tools/relnotes"
    files=[/Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go]

[Trace - 18:54:59.250 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:59 go/packages.Load\n\tsnapshot=4\n\tpackage=\"github.com/golang/vscode-go/tools/goplssetting [github.com/golang/vscode-go/tools/goplssetting.test]\"\n\tfiles=[/Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting.go /Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting_test.go]\n"}

[Info  - 6:54:59 PM] 2021/08/04 18:54:59 go/packages.Load
    snapshot=4
    package="github.com/golang/vscode-go/tools/goplssetting [github.com/golang/vscode-go/tools/goplssetting.test]"
    files=[/Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting.go /Users/hakim/projects/google/vscode-go/tools/goplssetting/goplssetting_test.go]

[Trace - 18:54:59.251 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:59 go/packages.Load\n\tsnapshot=4\n\tpackage=\"github.com/golang/vscode-go/tools/goplssetting.test\"\n\tfiles=[/Users/hakim/Library/Caches/go-build/60/60a68027560e5f9bca6b2555391b981793f56c2ea1767d8c251375f05d47a5c3-d]\n"}

[Info  - 6:54:59 PM] 2021/08/04 18:54:59 go/packages.Load
    snapshot=4
    package="github.com/golang/vscode-go/tools/goplssetting.test"
    files=[/Users/hakim/Library/Caches/go-build/60/60a68027560e5f9bca6b2555391b981793f56c2ea1767d8c251375f05d47a5c3-d]

[Trace - 18:54:59.278 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:59 discovered missing identifiers: map[cardinality:true kind:true syntax:true value:true]\n\tpackage=\"google.golang.org/protobuf/reflect/protoreflect\"\n"}

[Info  - 6:54:59 PM] 2021/08/04 18:54:59 discovered missing identifiers: map[cardinality:true kind:true syntax:true value:true]
    package="google.golang.org/protobuf/reflect/protoreflect"

[Trace - 18:54:59.308 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 18:54:59 discovered missing identifiers: map[unknownFieldsA:true]\n\tpackage=\"google.golang.org/protobuf/internal/impl\"\n"}

[Info  - 6:54:59 PM] 2021/08/04 18:54:59 discovered missing identifiers: map[unknownFieldsA:true]
    package="google.golang.org/protobuf/internal/impl"

[Trace - 18:55:00.133 PM] Received notification '$/progress'.
Params: {"token":"8674665223082153551","value":{"kind":"end","message":"Done."}}

[Trace - 18:55:00.135 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/hakim/projects/google/vscode-go/go.mod","diagnostics":[]}

[Trace - 18:55:00.426 PM] Sending request 'textDocument/hover - (18)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/google/vscode-go/tools/relnotes/relnotes.go"},"position":{"line":227,"character":23}}

[Trace - 18:55:00.443 PM] Received response 'textDocument/hover - (18)' in 17ms.
Result: {"contents":{"kind":"markdown","value":"```go\nfunc (*regexp.Regexp).FindStringSubmatch(s string) []string\n```\n\n[`(regexp.Regexp).FindStringSubmatch` on pkg.go.dev](https://pkg.go.dev/regexp?utm_source=gopls#Regexp.FindStringSubmatch)\n\nFindStringSubmatch returns a slice of strings holding the text of the\nleftmost match of the regular expression in s and the matches, if any, of\nits subexpressions, as defined by the \\'Submatch\\' description in the\npackage comment\\.\nA return value of nil indicates no match\\.\n"},"range":{"start":{"line":227,"character":19},"end":{"line":227,"character":37}}}

This was the only diagnostic message presented in go.mod. Screen Shot 2021-08-04 at 6 54 21 PM

Sorry that I didn't report with a simpler repro case. Probably it's easy enough (just adding a change that adds a new module to go.mod and the code) but want to check if this is a known issue.

stamblerre commented 3 years ago

I think the issue here is that the workspace is in a good state on start, so when the new dependency is added, it doesn't retry the initial workspace load. I would've expected there to be a diagnostic in the go.mod file to download the dependency, but I will try to write a repro test case and resolve this.

hyangah commented 2 years ago

Another case that is affected by this is when users switch between different branches - if the new branch includes old/new dependencies that are different from the current branch, users will face a very cryptic, non-actionable error message. (e.g. inconsistent vendoring, unavailable dependencies, etc).

Restarting Gopls is the current available workaround.

cc @golang/tools-team

findleyr commented 2 years ago

Per https://go.dev/cl/274120, this is actually WAI.

But I think it's confusing. When we reload the workspace we should allow network access.

hyangah commented 2 years ago

I think it would be nice if the gopls communicates clearly - "the requested modules (foo, bar, baz) aren't in the module cache; we need to fetch from the network to continue. Proceed? Yes : No".

Or, as my original report suggested, rewrite the error message (any error message that mentions GOPROXY=off is an internal error, and it's best to hide it from users IMO) and present the go mod tidy or go get option as a code action for the diagnostics.

findleyr commented 2 years ago

@hyangah if the workspace needs to be fully reloaded (due to go.mod or go.sum change), I think it seems reasonable to allow network access.

The original issue (#38462) was about go mod tidy diagnostics, but a full workspace reload would be far less frequent, and would correspond to user action (e.g. the save of a go.mod file).

That seems to Do The Right Thing rather than introduce a dialog for the user (esp. since not all LSP clients support showMessageRequest).

hyangah commented 2 years ago

@findleyr As long as users with poor network connection wouldn't experience the problem (hang) described in https://go.dev/cl/274120 description, I think that works too. (does it mean "allowImplicitNetworkAccess" option becomes true by default?)

BTW, the example https://github.com/golang/go/issues/47538#issuecomment-1111464719 is not associated with a user action happened inside editor, but file watch events triggered by the change outside of editor.

findleyr commented 2 years ago

Confirmed that this is now fixed at tip, following CL 419500.