Skip to content

x/tools/gopls: make command names more specific to avoid conflicts #41187

@jigargandhi

Description

@jigargandhi

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

When I start VSCode from a go project, gopls does not start and language features are not available

Please attach the stack trace from the crash.
A window with the error message should have popped up in the lower half of your screen.
Please copy the stack trace from that window and paste it in this issue.

[Error - 12:31:12 PM] Starting client failed
Error: command 'generate' already exists
at _.registerCommand (/root/.vscode-server/bin/a0479759d6e9ea56afa657e454193f72aef85bd0/out/vs/server/remoteExtensionHostProcess.js:665:142)
at Object.registerCommand (/root/.vscode-server/bin/a0479759d6e9ea56afa657e454193f72aef85bd0/out/vs/server/remoteExtensionHostProcess.js:961:119)
at ExecuteCommandFeature.register (/root/.vscode-server/extensions/golang.go-0.16.1/dist/goMain.js:12035:53)
at ExecuteCommandFeature.initialize (/root/.vscode-server/extensions/golang.go-0.16.1/dist/goMain.js:12015:14)
at LanguageClient.initializeFeatures (/root/.vscode-server/extensions/golang.go-0.16.1/dist/goMain.js:12847:21)
at /root/.vscode-server/extensions/golang.go-0.16.1/dist/goMain.js:12532:18
[Info - 12:31:13 PM] 2020/09/02 12:31:13 Build info

golang.org/x/tools/gopls 0.4.4
golang.org/x/tools/gopls@v0.4.4 h1:8djGYsaZ0ByP0vaXg4T+mnyfDcHpWKSZ+tpQSGv9ahk=
github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/google/go-cmp@v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c h1:jLQLIAedRoS9I2Py7l/ZAGGzUxLFsdg42JXEpS/a+ow=
golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
honnef.co/go/tools@v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
mvdan.cc/gofumpt@v0.0.0-20200709182408-4fd085cb6d5f h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE=
mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

Go info

go version go1.15 linux/amd64

gopls: failed reading header line: EOF

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.

NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.

[Trace - 12:31:12.625 PM] Sending request 'initialize - (0)'.
Params: {"processId":4601,"clientInfo":{"name":"vscode","version":"1.48.2"},"rootPath":"/root/go/src/github.com/jigargandhi/product","rootUri":"file:///root/go/src/github.com/jigargandhi/product","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"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]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"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]}},"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}},"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},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":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}}},"initializationOptions":{},"trace":"off","workspaceFolders":[{"uri":"file:///root/go/src/github.com/jigargandhi/product","name":"product"}]}

[Trace - 12:31:12.861 PM] Received response 'initialize - (0)' in 235ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"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":["generate","fill_struct","regenerate_cgo","test","tidy","undeclared_name","upgrade_dependency","vendor","extract_variable","extract_function"]},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"Build info\n----------\ngolang.org/x/tools/gopls 0.4.4\n golang.org/x/tools/gopls@v0.4.4 h1:8djGYsaZ0ByP0vaXg4T+mnyfDcHpWKSZ+tpQSGv9ahk=\n github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n github.com/google/go-cmp@v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=\n github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\n golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=\n golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=\n golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c h1:jLQLIAedRoS9I2Py7l/ZAGGzUxLFsdg42JXEpS/a+ow=\n golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=\n honnef.co/go/tools@v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=\n mvdan.cc/gofumpt@v0.0.0-20200709182408-4fd085cb6d5f h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE=\n mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=\n\nGo info\n-------\ngo version go1.15 linux/amd64\n\n"}}

[Trace - 12:31:12.864 PM] Sending notification 'initialized'.
Params: {}

[Trace - 12:31:12.866 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/products/products.go","languageId":"go","version":1,"text":"package products\n\nimport (\n\t"encoding/json"\n\t"net/http"\n\t"strconv"\n\t"text/template"\n\n\t"github.com/gorilla/mux"\n\t"github.com/jigargandhi/product/config"\n\t"github.com/jigargandhi/product/repo"\n)\n\n// ProductController does something\ntype ProductController struct {\n\ttemplate *template.Template\n\trepo repo.ProductProvider\n}\n\n// Creates new product\nfunc NewProduct(config *config.Config) *ProductController {\n\trepo, _ := repo.NewRepo(config)\n\treturn &ProductController{template: config.GetTemplates(), repo: repo}\n}\n\n// Handler gives products\nfunc (p *ProductController) Handler(w http.ResponseWriter, r *http.Request) {\n\tqueryParams := r.URL.Query()\n\tpageNumber, ok := queryParams["page"]\n\tif !ok {\n\t\tpageNumber = []string{"0"}\n\t}\n\n\t// w.WriteHeader(http.StatusOK)\n\tif r.Method == "GET" {\n\t\tpg, err := strconv.Atoi(pageNumber[0])\n\t\tif err != nil {\n\t\t\tpg = 0\n\t\t}\n\t\tproducts := p.repo.GetProducts(pg)\n\t\trespondWithJSON(w, http.StatusOK, products)\n\t} else {\n\t\tw.WriteHeader(http.StatusMethodNotAllowed)\n\t}\n}\n\nfunc (pc *ProductController) GetOne(w http.ResponseWriter, r *http.Request) {\n\tvars := mux.Vars(r)\n\tidS := vars["id"]\n\tid, _ := strconv.Atoi(idS)\n\tif r.Method == "GET" {\n\t\tproduct := pc.repo.GetProduct(id)\n\t\trespondWithJSON(w, http.StatusOK, product)\n\t} else {\n\t\tw.WriteHeader(http.StatusMethodNotAllowed)\n\t}\n\n}\n\nfunc respondWithJSON(w http.ResponseWriter, code int, payload interface{}) {\n\tresponse, _ := json.Marshal(payload)\n\n\tw.Header().Set("Content-Type", "application/json")\n\tw.WriteHeader(code)\n\tw.Write(response)\n}\n"}}

[Trace - 12:31:12.892 PM] Sending request 'textDocument/documentSymbol - (1)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/products/products.go"}}

[Trace - 12:31:12.905 PM] Sending request 'textDocument/documentLink - (2)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/products/products.go"}}

[Trace - 12:31:12.986 PM] Received request 'workspace/configuration - (1)'.
Params: {"items":[{"scopeUri":"file:///root/go/src/github.com/jigargandhi/product","section":"gopls"},{"scopeUri":"file:///root/go/src/github.com/jigargandhi/product","section":"gopls-product"}]}

[Trace - 12:31:12.986 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/09/02 12:31:12 Build info\n----------\ngolang.org/x/tools/gopls 0.4.4\n golang.org/x/tools/gopls@v0.4.4 h1:8djGYsaZ0ByP0vaXg4T+mnyfDcHpWKSZ+tpQSGv9ahk=\n github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n github.com/google/go-cmp@v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=\n github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\n golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=\n golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=\n golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c h1:jLQLIAedRoS9I2Py7l/ZAGGzUxLFsdg42JXEpS/a+ow=\n golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=\n honnef.co/go/tools@v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=\n mvdan.cc/gofumpt@v0.0.0-20200709182408-4fd085cb6d5f h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE=\n mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=\n\nGo info\n-------\ngo version go1.15 linux/amd64\n\n\n"}

[Info - 12:31:13 PM] 2020/09/02 12:31:12 Build info

golang.org/x/tools/gopls 0.4.4
golang.org/x/tools/gopls@v0.4.4 h1:8djGYsaZ0ByP0vaXg4T+mnyfDcHpWKSZ+tpQSGv9ahk=
github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/google/go-cmp@v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
golang.org/x/tools@v0.0.0-20200729181040-64cdafbe085c h1:jLQLIAedRoS9I2Py7l/ZAGGzUxLFsdg42JXEpS/a+ow=
golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
honnef.co/go/tools@v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
mvdan.cc/gofumpt@v0.0.0-20200709182408-4fd085cb6d5f h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE=
mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

Go info

go version go1.15 linux/amd64

[Trace - 12:31:13.012 PM] Sending response 'workspace/configuration - (1)' in 25ms.
Result: [null,null]

[Trace - 12:31:13.099 PM] Sending notification '$/cancelRequest'.
Params: {"id":1}

[Trace - 12:31:13.100 PM] Sending request 'textDocument/documentSymbol - (3)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/products/products.go"}}

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

[Trace - 12:31:13.102 PM] Sending request 'textDocument/documentLink - (4)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/products/products.go"}}

[Trace - 12:31:13.103 PM] Sending notification '$/cancelRequest'.
Params: {"id":3}

[Trace - 12:31:13.103 PM] Sending request 'textDocument/documentSymbol - (5)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/products/products.go"}}

[Trace - 12:31:13.104 PM] Sending request 'textDocument/documentLink - (6)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/products/products.go"}}

[Trace - 12:31:13.129 PM] Sending request 'textDocument/foldingRange - (7)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/products/products.go"}}

[Trace - 12:31:13.378 PM] Sending request 'textDocument/codeLens - (8)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/products/products.go"}}

[Trace - 12:31:13.396 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/09/02 12:31:13 go env for /root/go/src/github.com/jigargandhi/product\n(root /root/go/src/github.com/jigargandhi/product)\n(valid build configuration = true)\n(build flags: [])\nGOPRIVATE=\nGOSUMDB=sum.golang.org\nGOCACHE=/root/.cache/go-build\nGOFLAGS=\nGOMODCACHE=/root/go/pkg/mod\nGOMOD=/root/go/src/github.com/jigargandhi/product/go.mod\nGOPATH=/root/go\nGOPROXY=https://proxy.golang.org,direct\nGOROOT=/usr/local/go\nGO111MODULE=\nGOINSECURE=\nGONOPROXY=\nGONOSUMDB=\n\n"}

[Info - 12:31:13 PM] 2020/09/02 12:31:13 go env for /root/go/src/github.com/jigargandhi/product
(root /root/go/src/github.com/jigargandhi/product)
(valid build configuration = true)
(build flags: [])
GOPRIVATE=
GOSUMDB=sum.golang.org
GOCACHE=/root/.cache/go-build
GOFLAGS=
GOMODCACHE=/root/go/pkg/mod
GOMOD=/root/go/src/github.com/jigargandhi/product/go.mod
GOPATH=/root/go
GOPROXY=https://proxy.golang.org,direct
GOROOT=/usr/local/go
GO111MODULE=
GOINSECURE=
GONOPROXY=
GONOSUMDB=

[Trace - 12:31:13.396 PM] Received request 'client/registerCapability - (2)'.
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"},{"id":"workspace/didChangeWatchedFiles","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"/root/go/src/github.com/jigargandhi/product/**/*.{go,mod,sum}","kind":7}]}}]}

[Trace - 12:31:13.398 PM] Sending response 'client/registerCapability - (2)' in 1ms.
Result:

[Trace - 12:31:13.929 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/09/02 12:31:13 go/packages.Load\n\tsnapshot=0\n\tdirectory=/root/go/src/github.com/jigargandhi/product\n\tquery=[./... builtin]\n\tpackages=7\n"}

[Info - 12:31:13 PM] 2020/09/02 12:31:13 go/packages.Load
snapshot=0
directory=/root/go/src/github.com/jigargandhi/product
query=[./... builtin]
packages=7

[Trace - 12:31:14.092 PM] Sending notification '$/cancelRequest'.
Params: {"id":5}

[Error - Received] 12:31:14.107 PM golang/vscode-go#1 JSON RPC cancelled

[Error - Received] 12:31:14.151 PM golang/vscode-go#2 JSON RPC cancelled

[Error - Received] 12:31:14.151 PM golang/vscode-go#3 JSON RPC cancelled

[Trace - 12:31:14.232 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go","languageId":"go","version":1,"text":"package main\n\nimport (\n\t"fmt"\n\t"log"\n\t"net/http"\n\t"os"\n\t"time"\n\n\t"github.com/gorilla/handlers"\n\t"github.com/gorilla/mux"\n\t"github.com/jigargandhi/product/config"\n\t"github.com/jigargandhi/product/home"\n\t"github.com/jigargandhi/product/products"\n)\n\nfunc main() {\n\tf, _ := os.Open("./config.yml")\n\tcurrentConfig, _ := config.Create(f)\n\n\tproduct := products.NewProduct(currentConfig)\n\th := home.NewHome(currentConfig)\n\n\tr := mux.NewRouter()\n\tr.HandleFunc("/", h.Handler)\n\tr.HandleFunc("/api/products", product.Handler)\n\tr.HandleFunc("/api/product/{id:[0-9]+}", product.GetOne)\n\tr.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))\n\t//r.HandleFunc("/articles", ArticlesHandler)\n\t//http.Handle("/", r)\n\tloggedRouter := handlers.LoggingHandler(os.Stdout, r)\n\tsrv := &http.Server{\n\t\tHandler: loggedRouter,\n\t\tAddr: fmt.Sprintf("0.0.0.0:%d", currentConfig.Port),\n\t\t// Good practice: enforce timeouts for servers you create!\n\t\tWriteTimeout: 15 * time.Second,\n\t\tReadTimeout: 15 * time.Second,\n\t}\n\n\tlog.Fatal(srv.ListenAndServe())\n}\n"}}

[Trace - 12:31:14.250 PM] Sending notification '$/cancelRequest'.
Params: {"id":8}

[Trace - 12:31:14.250 PM] Sending notification '$/cancelRequest'.
Params: {"id":7}

[Trace - 12:31:14.251 PM] Sending notification '$/cancelRequest'.
Params: {"id":6}

[Trace - 12:31:14.251 PM] Sending request 'textDocument/documentLink - (9)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"}}

[Trace - 12:31:14.251 PM] Sending request 'textDocument/codeAction - (10)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"context":{"diagnostics":[]}}

[Trace - 12:31:14.251 PM] Sending request 'textDocument/documentSymbol - (11)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"}}

[Trace - 12:31:14.251 PM] Sending request 'textDocument/documentHighlight - (12)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"position":{"line":26,"character":52}}

[Trace - 12:31:14.357 PM] Sending request 'textDocument/foldingRange - (13)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"}}

[Trace - 12:31:14.397 PM] Received response 'textDocument/documentLink - (4)' in 1294ms.
Result: [{"range":{"start":{"line":3,"character":2},"end":{"line":3,"character":15}},"target":"https://pkg.go.dev/encoding/json"},{"range":{"start":{"line":4,"character":2},"end":{"line":4,"character":10}},"target":"https://pkg.go.dev/net/http"},{"range":{"start":{"line":5,"character":2},"end":{"line":5,"character":9}},"target":"https://pkg.go.dev/strconv"},{"range":{"start":{"line":6,"character":2},"end":{"line":6,"character":15}},"target":"https://pkg.go.dev/text/template"},{"range":{"start":{"line":8,"character":2},"end":{"line":8,"character":24}},"target":"https://pkg.go.dev/github.com/gorilla/mux@v1.8.0"},{"range":{"start":{"line":9,"character":2},"end":{"line":9,"character":39}},"target":"https://pkg.go.dev/github.com/jigargandhi/product/config"},{"range":{"start":{"line":10,"character":2},"end":{"line":10,"character":37}},"target":"https://pkg.go.dev/github.com/jigargandhi/product/repo"}]

[Error - Received] 12:31:14.397 PM golang/vscode-go#7 JSON RPC cancelled

[Error - Received] 12:31:14.397 PM golang/vscode-go#5 JSON RPC cancelled

[Error - Received] 12:31:14.397 PM golang/vscode-go#6 JSON RPC cancelled

[Error - Received] 12:31:14.397 PM golang/vscode-go#8 JSON RPC cancelled

[Trace - 12:31:14.400 PM] Received response 'textDocument/documentLink - (9)' in 149ms.
Result: [{"range":{"start":{"line":3,"character":2},"end":{"line":3,"character":5}},"target":"https://pkg.go.dev/fmt"},{"range":{"start":{"line":4,"character":2},"end":{"line":4,"character":5}},"target":"https://pkg.go.dev/log"},{"range":{"start":{"line":5,"character":2},"end":{"line":5,"character":10}},"target":"https://pkg.go.dev/net/http"},{"range":{"start":{"line":6,"character":2},"end":{"line":6,"character":4}},"target":"https://pkg.go.dev/os"},{"range":{"start":{"line":7,"character":2},"end":{"line":7,"character":6}},"target":"https://pkg.go.dev/time"},{"range":{"start":{"line":9,"character":2},"end":{"line":9,"character":29}},"target":"https://pkg.go.dev/github.com/gorilla/handlers@v1.5.0"},{"range":{"start":{"line":10,"character":2},"end":{"line":10,"character":24}},"target":"https://pkg.go.dev/github.com/gorilla/mux@v1.8.0"},{"range":{"start":{"line":11,"character":2},"end":{"line":11,"character":39}},"target":"https://pkg.go.dev/github.com/jigargandhi/product/config"},{"range":{"start":{"line":12,"character":2},"end":{"line":12,"character":37}},"target":"https://pkg.go.dev/github.com/jigargandhi/product/home"},{"range":{"start":{"line":13,"character":2},"end":{"line":13,"character":41}},"target":"https://pkg.go.dev/github.com/jigargandhi/product/products"},{"range":{"start":{"line":33,"character":24},"end":{"line":33,"character":31}},"target":"https://0.0.0.0"}]

[Trace - 12:31:14.401 PM] Received response 'textDocument/codeAction - (10)' in 150ms.
Result: null

[Trace - 12:31:14.402 PM] Received response 'textDocument/documentSymbol - (11)' in 150ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":16,"character":0},"end":{"line":40,"character":1}},"selectionRange":{"start":{"line":16,"character":5},"end":{"line":16,"character":9}}}]

[Trace - 12:31:14.402 PM] Received response 'textDocument/documentHighlight - (12)' in 150ms.
Result: [{"range":{"start":{"line":26,"character":50},"end":{"line":26,"character":56}},"kind":1}]

[Trace - 12:31:14.402 PM] Received response 'textDocument/foldingRange - (13)' in 45ms.
Result: [{"startLine":2,"startCharacter":8,"endLine":13,"endCharacter":42,"kind":"imports"},{"startLine":16,"startCharacter":13,"endLine":39,"endCharacter":32},{"startLine":28,"startCharacter":45,"endLine":29,"endCharacter":22,"kind":"comment"},{"startLine":31,"startCharacter":21,"endLine":36,"endCharacter":32}]

[Trace - 12:31:14.409 PM] Sending request 'textDocument/codeLens - (14)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"}}

[Trace - 12:31:14.409 PM] Received response 'textDocument/codeLens - (14)' in 0ms.
Result: null

[Trace - 12:31:14.414 PM] Sending request 'textDocument/codeAction - (15)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"range":{"start":{"line":26,"character":52},"end":{"line":26,"character":52}},"context":{"diagnostics":[]}}

[Trace - 12:31:14.414 PM] Received response 'textDocument/codeAction - (15)' in 0ms.
Result: null

[Trace - 12:31:14.752 PM] Sending request 'textDocument/hover - (16)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"position":{"line":26,"character":23}}

[Trace - 12:31:14.753 PM] Received response 'textDocument/hover - (16)' in 0ms.
Result: null

[Trace - 12:31:15.161 PM] Sending request 'textDocument/hover - (17)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"position":{"line":26,"character":24}}

[Trace - 12:31:15.161 PM] Received response 'textDocument/hover - (17)' in 0ms.
Result: null

[Trace - 12:31:15.573 PM] Sending request 'textDocument/hover - (18)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"position":{"line":26,"character":26}}

[Trace - 12:31:15.573 PM] Received response 'textDocument/hover - (18)' in 0ms.
Result: null

[Trace - 12:31:15.646 PM] Sending request 'textDocument/documentHighlight - (19)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"position":{"line":26,"character":27}}

[Trace - 12:31:15.646 PM] Received response 'textDocument/documentHighlight - (19)' in 0ms.
Result: []

[Trace - 12:31:15.883 PM] Sending request 'textDocument/codeAction - (20)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"range":{"start":{"line":26,"character":27},"end":{"line":26,"character":27}},"context":{"diagnostics":[]}}

[Trace - 12:31:15.884 PM] Received response 'textDocument/codeAction - (20)' in 0ms.
Result: null

[Trace - 12:31:16.137 PM] Sending request 'textDocument/hover - (21)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"position":{"line":28,"character":29}}

[Trace - 12:31:16.138 PM] Received response 'textDocument/hover - (21)' in 0ms.
Result: null

[Trace - 12:31:17.858 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go","version":2},"contentChanges":[{"range":{"start":{"line":26,"character":27},"end":{"line":26,"character":27}},"rangeLength":0,"text":"s"}]}

[Trace - 12:31:18.040 PM] Sending request 'textDocument/foldingRange - (22)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"}}

[Trace - 12:31:18.040 PM] Received response 'textDocument/foldingRange - (22)' in 0ms.
Result: [{"startLine":2,"startCharacter":8,"endLine":13,"endCharacter":42,"kind":"imports"},{"startLine":16,"startCharacter":13,"endLine":39,"endCharacter":32},{"startLine":28,"startCharacter":45,"endLine":29,"endCharacter":22,"kind":"comment"},{"startLine":31,"startCharacter":21,"endLine":36,"endCharacter":32}]

[Trace - 12:31:18.090 PM] Sending request 'textDocument/codeLens - (23)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"}}

[Trace - 12:31:18.090 PM] Received response 'textDocument/codeLens - (23)' in 0ms.
Result: null

[Trace - 12:31:18.096 PM] Sending request 'textDocument/codeAction - (24)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"range":{"start":{"line":26,"character":28},"end":{"line":26,"character":28}},"context":{"diagnostics":[]}}

[Trace - 12:31:18.096 PM] Received response 'textDocument/codeAction - (24)' in 0ms.
Result: null

[Trace - 12:31:18.191 PM] Sending request 'textDocument/documentSymbol - (25)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"}}

[Trace - 12:31:18.191 PM] Received response 'textDocument/documentSymbol - (25)' in 0ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":16,"character":0},"end":{"line":40,"character":1}},"selectionRange":{"start":{"line":16,"character":5},"end":{"line":16,"character":9}}}]

[Trace - 12:31:18.845 PM] Sending request 'textDocument/documentLink - (26)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"}}

[Trace - 12:31:18.846 PM] Received response 'textDocument/documentLink - (26)' in 0ms.
Result: [{"range":{"start":{"line":3,"character":2},"end":{"line":3,"character":5}},"target":"https://pkg.go.dev/fmt"},{"range":{"start":{"line":4,"character":2},"end":{"line":4,"character":5}},"target":"https://pkg.go.dev/log"},{"range":{"start":{"line":5,"character":2},"end":{"line":5,"character":10}},"target":"https://pkg.go.dev/net/http"},{"range":{"start":{"line":6,"character":2},"end":{"line":6,"character":4}},"target":"https://pkg.go.dev/os"},{"range":{"start":{"line":7,"character":2},"end":{"line":7,"character":6}},"target":"https://pkg.go.dev/time"},{"range":{"start":{"line":9,"character":2},"end":{"line":9,"character":29}},"target":"https://pkg.go.dev/github.com/gorilla/handlers@v1.5.0"},{"range":{"start":{"line":10,"character":2},"end":{"line":10,"character":24}},"target":"https://pkg.go.dev/github.com/gorilla/mux@v1.8.0"},{"range":{"start":{"line":11,"character":2},"end":{"line":11,"character":39}},"target":"https://pkg.go.dev/github.com/jigargandhi/product/config"},{"range":{"start":{"line":12,"character":2},"end":{"line":12,"character":37}},"target":"https://pkg.go.dev/github.com/jigargandhi/product/home"},{"range":{"start":{"line":13,"character":2},"end":{"line":13,"character":41}},"target":"https://pkg.go.dev/github.com/jigargandhi/product/products"},{"range":{"start":{"line":33,"character":24},"end":{"line":33,"character":31}},"target":"https://0.0.0.0"}]

[Trace - 12:31:18.958 PM] Sending request 'textDocument/codeAction - (27)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"range":{"start":{"line":0,"character":0},"end":{"line":41,"character":0}},"context":{"diagnostics":[],"only":["source.organizeImports"]}}

[Trace - 12:31:18.958 PM] Received response 'textDocument/codeAction - (27)' in 0ms.
Result: null

[Trace - 12:31:19.016 PM] Sending request 'textDocument/formatting - (28)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"options":{"tabSize":4,"insertSpaces":false}}

[Trace - 12:31:19.017 PM] Received response 'textDocument/formatting - (28)' in 1ms.
Result: []

[Trace - 12:31:19.134 PM] Sending notification 'textDocument/didSave'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go","version":2}}

[Trace - 12:31:19.432 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {"changes":[{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go","type":2}]}

[Trace - 12:31:24.572 PM] Sending request 'textDocument/hover - (29)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"position":{"line":31,"character":13}}

[Trace - 12:31:24.575 PM] Received response 'textDocument/hover - (29)' in 2ms.
Result: {"contents":{"kind":"markdown","value":"go\nServer struct {\n\t// Addr optionally specifies the TCP address for the server to listen on,\n\t// in the form \"host:port\". If empty, \":http\" (port 80) is used.\n\t// The service names are defined in RFC 6335 and assigned by IANA.\n\t// See net.Dial for details of the address format.\n\tAddr string\n\n\tHandler Handler // handler to invoke, http.DefaultServeMux if nil\n\n\t// TLSConfig optionally provides a TLS configuration for use\n\t// by ServeTLS and ListenAndServeTLS. Note that this value is\n\t// cloned by ServeTLS and ListenAndServeTLS, so it's not\n\t// possible to modify the configuration with methods like\n\t// tls.Config.SetSessionTicketKeys. To use\n\t// SetSessionTicketKeys, use Server.Serve with a TLS Listener\n\t// instead.\n\tTLSConfig *tls.Config\n\n\t// ReadTimeout is the maximum duration for reading the entire\n\t// request, including the body.\n\t//\n\t// Because ReadTimeout does not let Handlers make per-request\n\t// decisions on each request body's acceptable deadline or\n\t// upload rate, most users will prefer to use\n\t// ReadHeaderTimeout. It is valid to use them both.\n\tReadTimeout time.Duration\n\n\t// ReadHeaderTimeout is the amount of time allowed to read\n\t// request headers. The connection's read deadline is reset\n\t// after reading the headers and the Handler can decide what\n\t// is considered too slow for the body. If ReadHeaderTimeout\n\t// is zero, the value of ReadTimeout is used. If both are\n\t// zero, there is no timeout.\n\tReadHeaderTimeout time.Duration\n\n\t// WriteTimeout is the maximum duration before timing out\n\t// writes of the response. It is reset whenever a new\n\t// request's header is read. Like ReadTimeout, it does not\n\t// let Handlers make decisions on a per-request basis.\n\tWriteTimeout time.Duration\n\n\t// IdleTimeout is the maximum amount of time to wait for the\n\t// next request when keep-alives are enabled. If IdleTimeout\n\t// is zero, the value of ReadTimeout is used. If both are\n\t// zero, there is no timeout.\n\tIdleTimeout time.Duration\n\n\t// MaxHeaderBytes controls the maximum number of bytes the\n\t// server will read parsing the request header's keys and\n\t// values, including the request line. It does not limit the\n\t// size of the request body.\n\t// If zero, DefaultMaxHeaderBytes is used.\n\tMaxHeaderBytes int\n\n\t// TLSNextProto optionally specifies a function to take over\n\t// ownership of the provided TLS connection when an ALPN\n\t// protocol upgrade has occurred. The map key is the protocol\n\t// name negotiated. The Handler argument should be used to\n\t// handle HTTP requests and will initialize the Request's TLS\n\t// and RemoteAddr if not already set. The connection is\n\t// automatically closed when the function returns.\n\t// If TLSNextProto is not nil, HTTP/2 support is not enabled\n\t// automatically.\n\tTLSNextProto map[string]func(*Server, *tls.Conn, Handler)\n\n\t// ConnState specifies an optional callback function that is\n\t// called when a client connection changes state. See the\n\t// ConnState type and associated constants for details.\n\tConnState func(net.Conn, ConnState)\n\n\t// ErrorLog specifies an optional logger for errors accepting\n\t// connections, unexpected behavior from handlers, and\n\t// underlying FileSystem errors.\n\t// If nil, logging is done via the log package's standard logger.\n\tErrorLog *log.Logger\n\n\t// BaseContext optionally specifies a function that returns\n\t// the base context for incoming requests on this server.\n\t// The provided Listener is the specific Listener that's\n\t// about to start accepting requests.\n\t// If BaseContext is nil, the default is context.Background().\n\t// If non-nil, it must return a non-nil context.\n\tBaseContext func(net.Listener) context.Context\n\n\t// ConnContext optionally specifies a function that modifies\n\t// the context used for a new connection c. The provided ctx\n\t// is derived from the base context and has a ServerContextKey\n\t// value.\n\tConnContext func(ctx context.Context, c net.Conn) context.Context\n\n\tinShutdown atomicBool // true when when server is in shutdown\n\n\tdisableKeepAlives int32 // accessed atomically.\n\tnextProtoOnce sync.Once // guards setupHTTP2_* init\n\tnextProtoErr error // result of http2.ConfigureServer if used\n\n\tmu sync.Mutex\n\tlisteners map[*net.Listener]struct{}\n\tactiveConn map[*conn]struct{}\n\tdoneChan chan struct{}\n\tonShutdown []func()\n}\n\n\nhttp.Server on pkg.go.dev\n\nA Server defines parameters for running an HTTP server\.\nThe zero value for Server is a valid configuration\.\n"},"range":{"start":{"line":31,"character":14},"end":{"line":31,"character":20}}}

[Trace - 12:31:35.259 PM] Sending request 'textDocument/hover - (30)'.
Params: {"textDocument":{"uri":"file:///root/go/src/github.com/jigargandhi/product/cmd/product/main.go"},"position":{"line":34,"character":7}}

[Trace - 12:31:35.259 PM] Received response 'textDocument/hover - (30)' in 0ms.
Result: null

[Trace - 12:31:44.402 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/09/02 12:31:44 background imports cache refresh starting\n"}

[Info - 12:31:44 PM] 2020/09/02 12:31:44 background imports cache refresh starting

[Trace - 12:31:44.859 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/09/02 12:31:44 background refresh finished after 457.9318ms\n"}

[Info - 12:31:44 PM] 2020/09/02 12:31:44 background refresh finished after 457.9318ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeToolsThis 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

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions