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: push diagnostics after go mod edit -go=1.18 #51325

Closed
suzmue opened this issue Feb 22, 2022 · 1 comment
Closed

x/tools/gopls: push diagnostics after go mod edit -go=1.18 #51325

suzmue opened this issue Feb 22, 2022 · 1 comment
Labels
FrozenDueToAge 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

@suzmue
Copy link
Contributor

suzmue commented Feb 22, 2022

gopls version

Build info
----------
golang.org/x/tools/gopls v0.8.0-pre.2
    golang.org/x/tools/gopls@v0.8.0-pre.2 h1:rOSxYM+Uf60ZZ5Gkp6YZ+VvWtMpfLg7qdy5S5tN/LWw=
    github.com/BurntSushi/toml@v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU=
    github.com/google/go-cmp@v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o=
    golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
    golang.org/x/sys@v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
    golang.org/x/text@v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
    golang.org/x/tools@v0.1.10-0.20220218151557-0d40b49f18b2 h1:CdY6OQBMOaTQ7uDjeBKGUHC8PnK90FbvRM3oAE843eg=
    golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
    honnef.co/go/tools@v0.2.2 h1:MNh1AVMyVX23VUHE2O27jm6lNj3vjO5DexS4A1xvnzk=
    mvdan.cc/gofumpt@v0.2.1 h1:7jakRGkQcLAJdT+C8Bwc9d0BANkVPSkHZkzNv07pJAs=
    mvdan.cc/xurls/v2@v2.3.0 h1:59Olnbt67UKpxF1EwVBopJvkSUBmgtb468E4GVWIZ1I=
go: go1.18rc1

go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/suzmue/Library/Caches/go-build"
GOENV="/Users/suzmue/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/suzmue/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/suzmue/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/suzmue/sdk/go1.18rc1"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/suzmue/sdk/go1.18rc1/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18rc1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/suzmue/helloWorld/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

Wrote code with type parameters, but the go directive had a go version < 1.18

main.go:

package main

func main() {

}

func myFunc[T int](a T) {

}

go.mod:

module github.com/suzmue/helloWorld

go 1.16

I got a diagnostic error on [T int]. From the terminal I ran go mod edit -go=1.18.

There were no updated diagnostics sent.

What did you expect to see?

The diagnostic on [T int] to disappear.

What did you see instead?

The diagnostic remained and no diagnostics were pushed by gopls.

Editor and settings

    "go.testTimeout": "2m",
    "go.languageServerFlags": ["-rpc.trace"],

Logs

gopls trace:

[Trace - 12:54:22.768 PM] Sending request 'initialize - (0)'.
Params: {"processId":43880,"clientInfo":{"name":"Visual Studio Code","version":"1.64.2"},"locale":"en-us","rootPath":"/Users/suzmue/helloWorld","rootUri":"file:///Users/suzmue/helloWorld","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":{},"trace":"off","workspaceFolders":[{"uri":"file:///Users/suzmue/helloWorld","name":"helloWorld"}]}

[Trace - 12:54:22.770 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_imports","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"]},"callHierarchyProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"{"GoVersion":"go1.18rc1","Path":"golang.org/x/tools/gopls","Main":{"Path":"golang.org/x/tools/gopls","Version":"v0.8.0-pre.2","Sum":"h1:rOSxYM+Uf60ZZ5Gkp6YZ+VvWtMpfLg7qdy5S5tN/LWw=","Replace":null},"Deps":[{"Path":"github.com/BurntSushi/toml","Version":"v1.0.0","Sum":"h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU=","Replace":null},{"Path":"github.com/google/go-cmp","Version":"v0.5.7","Sum":"h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=","Replace":null},{"Path":"github.com/sergi/go-diff","Version":"v1.1.0","Sum":"h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=","Replace":null},{"Path":"golang.org/x/mod","Version":"v0.6.0-dev.0.20220106191415-9b9b3d81d5e3","Sum":"h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o=","Replace":null},{"Path":"golang.org/x/sync","Version":"v0.0.0-20210220032951-036812b2e83c","Sum":"h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=","Replace":null},{"Path":"golang.org/x/sys","Version":"v0.0.0-20220114195835-da31bd327af9","Sum":"h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=","Replace":null},{"Path":"golang.org/x/text","Version":"v0.3.7","Sum":"h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=","Replace":null},{"Path":"golang.org/x/tools","Version":"v0.1.10-0.20220218151557-0d40b49f18b2","Sum":"h1:CdY6OQBMOaTQ7uDjeBKGUHC8PnK90FbvRM3oAE843eg=","Replace":null},{"Path":"golang.org/x/xerrors","Version":"v0.0.0-20200804184101-5ec99f83aff1","Sum":"h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=","Replace":null},{"Path":"honnef.co/go/tools","Version":"v0.2.2","Sum":"h1:MNh1AVMyVX23VUHE2O27jm6lNj3vjO5DexS4A1xvnzk=","Replace":null},{"Path":"mvdan.cc/gofumpt","Version":"v0.2.1","Sum":"h1:7jakRGkQcLAJdT+C8Bwc9d0BANkVPSkHZkzNv07pJAs=","Replace":null},{"Path":"mvdan.cc/xurls/v2","Version":"v2.3.0","Sum":"h1:59Olnbt67UKpxF1EwVBopJvkSUBmgtb468E4GVWIZ1I=","Replace":null}],"Settings":[{"Key":"-compiler","Value":"gc"},{"Key":"CGO_ENABLED","Value":"1"},{"Key":"CGO_CFLAGS","Value":""},{"Key":"CGO_CPPFLAGS","Value":""},{"Key":"CGO_CXXFLAGS","Value":""},{"Key":"CGO_LDFLAGS","Value":""},{"Key":"GOARCH","Value":"amd64"},{"Key":"GOOS","Value":"darwin"},{"Key":"GOAMD64","Value":"v1"}],"Version":"v0.8.0-pre.2"}"}}

[Trace - 12:54:22.808 PM] Sending notification 'initialized'.
Params: {}

[Trace - 12:54:22.808 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///Users/suzmue/helloWorld/main.go","languageId":"go","version":1,"text":"package main\n\nimport "fmt"\n\nfunc main() {\n\tx, y := 5, 3\n\tvar myVar myInterface = myImpl{x: 1}\n\tmyVar.Bad()\n\tgoodbye("good", "great", "awesome")\n\tfmt.Println(x)\n\tfmt.Println(y)\n\n}\n\nfunc myFunc[T int](a T) {\n\n}\n\nfunc goodbye(_, _, _ string) string {\n\tfmt.Println("hello")\n\treturn "hello"\n}\n\ntype myInterface interface {\n\tBad()\n}\n\ntype myImpl struct {\n\tx int\n}\n\nfunc (m myImpl) Bad() {\n\n}\n"}}

[Trace - 12:54:22.808 PM] Sending request 'textDocument/codeAction - (1)'.
Params: {"textDocument":{"uri":"file:///Users/suzmue/helloWorld/main.go"},"range":{"start":{"line":23,"character":2},"end":{"line":23,"character":3}},"context":{"diagnostics":[]}}

[Trace - 12:54:22.808 PM] Received request 'window/workDoneProgress/create - (1)'.
Params: {"token":"5577006791947779410"}

[Trace - 12:54:22.808 PM] Sending request 'textDocument/documentLink - (2)'.
Params: {"textDocument":{"uri":"file:///Users/suzmue/helloWorld/main.go"}}

[Trace - 12:54:22.810 PM] Sending response 'window/workDoneProgress/create - (1)' in 1ms.
Result:

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

[Trace - 12:54:22.810 PM] Received request 'workspace/configuration - (2)'.
Params: {"items":[{"scopeUri":"file:///Users/suzmue/helloWorld","section":"gopls"}]}

[Trace - 12:54:22.819 PM] Sending response 'workspace/configuration - (2)' in 8ms.
Result: [{}]

[Trace - 12:54:22.857 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2022/02/22 12:54:22 go env for /Users/suzmue/helloWorld\n(root /Users/suzmue/helloWorld)\n(go version go version go1.18rc1 darwin/amd64)\n(valid build configuration = true)\n(build flags: [])\nGOINSECURE=\nGOPRIVATE=\nGO111MODULE=\nGOMODCACHE=/Users/suzmue/go/pkg/mod\nGOMOD=/Users/suzmue/helloWorld/go.mod\nGONOSUMDB=\nGOSUMDB=sum.golang.org\nGOWORK=\nGOFLAGS=\nGONOPROXY=\nGOPROXY=https://proxy.golang.org,direct\nGOPATH=/Users/suzmue/go\nGOCACHE=/Users/suzmue/Library/Caches/go-build\nGOROOT=/Users/suzmue/sdk/go1.18rc1\n\n"}

[Trace - 12:54:22.880 PM] Sending notification '$/cancelRequest'.
Params: {"id":2}

[Trace - 12:54:22.880 PM] Sending request 'textDocument/documentLink - (3)'.
Params: {"textDocument":{"uri":"file:///Users/suzmue/helloWorld/main.go"}}

[Info - 12:54:22 PM] 2022/02/22 12:54:22 go env for /Users/suzmue/helloWorld
(root /Users/suzmue/helloWorld)
(go version go version go1.18rc1 darwin/amd64)
(valid build configuration = true)
(build flags: [])
GOINSECURE=
GOPRIVATE=
GO111MODULE=
GOMODCACHE=/Users/suzmue/go/pkg/mod
GOMOD=/Users/suzmue/helloWorld/go.mod
GONOSUMDB=
GOSUMDB=sum.golang.org
GOWORK=
GOFLAGS=
GONOPROXY=
GOPROXY=https://proxy.golang.org,direct
GOPATH=/Users/suzmue/go
GOCACHE=/Users/suzmue/Library/Caches/go-build
GOROOT=/Users/suzmue/sdk/go1.18rc1

[Trace - 12:54:22.985 PM] Sending request 'textDocument/foldingRange - (4)'.
Params: {"textDocument":{"uri":"file:///Users/suzmue/helloWorld/main.go"}}

[Trace - 12:54:23.113 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2022/02/22 12:54:23 go/packages.Load\n\tsnapshot=0\n\tdirectory=/Users/suzmue/helloWorld\n\tquery=[builtin github.com/suzmue/helloWorld/...]\n\tpackages=5\n"}

[Info - 12:54:23 PM] 2022/02/22 12:54:23 go/packages.Load
snapshot=0
directory=/Users/suzmue/helloWorld
query=[builtin github.com/suzmue/helloWorld/...]
packages=5

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

[Trace - 12:54:23.161 PM] Received request 'client/registerCapability - (3)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{go,mod,sum,work}","kind":7},{"globPattern":"{/Users/suzmue/helloWorld/sub}","kind":7}]}}]}

[Trace - 12:54:23.161 PM] Sending response 'client/registerCapability - (3)' in 0ms.
Result:

[Trace - 12:54:23.166 PM] Received request 'client/registerCapability - (4)'.
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"}]}

[Trace - 12:54:23.167 PM] Sending response 'client/registerCapability - (4)' in 0ms.
Result:

[Trace - 12:54:23.247 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2022/02/22 12:54:23 discovered missing identifiers: map[memRecordCycle:true pageBits:true]\n\tpackage="runtime"\n"}

[Info - 12:54:23 PM] 2022/02/22 12:54:23 discovered missing identifiers: map[memRecordCycle:true pageBits:true]
package="runtime"

[Trace - 12:54:23.319 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2022/02/22 12:54:23 unable to compute positions for type errors: no parsed file for in github.com/suzmue/helloWorld\n\tpackage="github.com/suzmue/helloWorld"\n"}

[Error - 12:54:23 PM] 2022/02/22 12:54:23 unable to compute positions for type errors: no parsed file for in github.com/suzmue/helloWorld
package="github.com/suzmue/helloWorld"

[Error - Received] 12:54:23.320 PM #2 JSON RPC cancelled

[Trace - 12:54:23.320 PM] Received response 'textDocument/codeAction - (1)' in 511ms.
Result: null

[Trace - 12:54:23.320 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/suzmue/helloWorld/main.go","version":1,"diagnostics":[{"range":{"start":{"line":14,"character":12},"end":{"line":14,"character":17}},"severity":1,"code":"ErrorCode(135)","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#ErrorCode(135)"},"source":"compiler","message":"type parameters require go1.18 or later"}]}

[Trace - 12:54:23.320 PM] Received response 'textDocument/documentLink - (3)' in 440ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 12:54:23.321 PM] Received response 'textDocument/foldingRange - (4)' in 335ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":10,"endCharacter":15},{"startLine":18,"startCharacter":37,"endLine":20,"endCharacter":15},{"startLine":23,"startCharacter":28,"endLine":24,"endCharacter":6},{"startLine":27,"startCharacter":20,"endLine":28,"endCharacter":6}]

[Trace - 12:54:23.329 PM] Sending request 'textDocument/codeLens - (5)'.
Params: {"textDocument":{"uri":"file:///Users/suzmue/helloWorld/main.go"}}

[Trace - 12:54:23.329 PM] Received response 'textDocument/codeLens - (5)' in 0ms.
Result: null

[Trace - 12:54:23.587 PM] Sending request 'textDocument/codeAction - (6)'.
Params: {"textDocument":{"uri":"file:///Users/suzmue/helloWorld/main.go"},"range":{"start":{"line":23,"character":2},"end":{"line":23,"character":3}},"context":{"diagnostics":[]}}

[Trace - 12:54:23.589 PM] Received response 'textDocument/codeAction - (6)' in 1ms.
Result: null

[Trace - 12:54:23.939 PM] Sending request 'textDocument/codeAction - (7)'.
Params: {"textDocument":{"uri":"file:///Users/suzmue/helloWorld/main.go"},"range":{"start":{"line":23,"character":2},"end":{"line":23,"character":3}},"context":{"diagnostics":[]}}

[Trace - 12:54:23.940 PM] Received response 'textDocument/codeAction - (7)' in 0ms.
Result: null

[Trace - 12:54:23.962 PM] Sending request 'textDocument/documentSymbol - (8)'.
Params: {"textDocument":{"uri":"file:///Users/suzmue/helloWorld/main.go"}}

[Trace - 12:54:23.962 PM] Received response 'textDocument/documentSymbol - (8)' in 0ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":12,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}},{"name":"myFunc","detail":"(a T)","kind":12,"range":{"start":{"line":14,"character":0},"end":{"line":16,"character":1}},"selectionRange":{"start":{"line":14,"character":5},"end":{"line":14,"character":11}}},{"name":"goodbye","detail":"(_ string, _ string, _ string)","kind":12,"range":{"start":{"line":18,"character":0},"end":{"line":21,"character":1}},"selectionRange":{"start":{"line":18,"character":5},"end":{"line":18,"character":12}}},{"name":"myInterface","detail":"interface{...}","kind":11,"range":{"start":{"line":23,"character":5},"end":{"line":25,"character":1}},"selectionRange":{"start":{"line":23,"character":5},"end":{"line":23,"character":16}},"children":[{"name":"Bad","kind":6,"range":{"start":{"line":24,"character":1},"end":{"line":24,"character":6}},"selectionRange":{"start":{"line":24,"character":1},"end":{"line":24,"character":4}}}]},{"name":"myImpl","detail":"struct{...}","kind":23,"range":{"start":{"line":27,"character":5},"end":{"line":29,"character":1}},"selectionRange":{"start":{"line":27,"character":5},"end":{"line":27,"character":11}},"children":[{"name":"x","detail":"int","kind":8,"range":{"start":{"line":28,"character":1},"end":{"line":28,"character":6}},"selectionRange":{"start":{"line":28,"character":1},"end":{"line":28,"character":2}}}]},{"name":"(myImpl).Bad","detail":"()","kind":6,"range":{"start":{"line":31,"character":0},"end":{"line":33,"character":1}},"selectionRange":{"start":{"line":31,"character":16},"end":{"line":31,"character":19}}}]

[Trace - 12:54:38.820 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {"changes":[{"uri":"file:///Users/suzmue/helloWorld/go.mod","type":2}]}

[Trace - 12:54:39.272 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2022/02/22 12:54:39 go/packages.Load\n\tsnapshot=2\n\tdirectory=/Users/suzmue/helloWorld\n\tquery=[builtin github.com/suzmue/helloWorld/...]\n\tpackages=5\n"}

[Info - 12:54:39 PM] 2022/02/22 12:54:39 go/packages.Load
snapshot=2
directory=/Users/suzmue/helloWorld
query=[builtin github.com/suzmue/helloWorld/...]
packages=5

[Trace - 12:54:53.191 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2022/02/22 12:54:53 background imports cache refresh starting\n"}

[Info - 12:54:53 PM] 2022/02/22 12:54:53 background imports cache refresh starting

[Trace - 12:54:53.345 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2022/02/22 12:54:53 background refresh finished after 172.27322ms\n"}

[Info - 12:54:53 PM] 2022/02/22 12:54:53 background refresh finished after 172.27322ms

@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 22, 2022
@gopherbot gopherbot added this to the Unreleased milestone Feb 22, 2022
@gopherbot
Copy link

Change https://go.dev/cl/387914 mentions this issue: internal/lsp: hash go version into package key

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge 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