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: invalid build configuration with symlinked GOPATH #38558

Open
CodingPapi opened this issue Apr 21, 2020 · 6 comments
Open

x/tools/gopls: invalid build configuration with symlinked GOPATH #38558

CodingPapi opened this issue Apr 21, 2020 · 6 comments

Comments

@CodingPapi
Copy link

@CodingPapi CodingPapi commented Apr 21, 2020

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

$ go version
go version go1.14.1 linux/amd64

Does this issue reproduce with the latest release?

yes

golang.org/x/tools/gopls@v0.4.0 h1:G4+YP9kaV4dJb79J5MobyApxX493Qa6VoiTceUmxqik=

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mattl/.cache/go-build"
GOENV="/home/mattl/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/repo/mattl/gitRepos/vonu-mgmt"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/mattl/usr/share/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/mattl/usr/share/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build920806173=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I use nvim with coc-vim, when I first edit the go file that contain main package then go to definition works well, let's say I jumped into a function in another go file receiver.go. Thing got wired when I directly open receiver.go(or another files) without open main file first and jump from main file, go definition errors on every function even the func is defined inside receiver.go

gopls -rpc.trace -v check src/comm/receiver/restapi.go Output

2020/04/21 16:11:56 Info:2020/04/21 16:11:56 Build info

golang.org/x/tools/gopls 0.4.0
golang.org/x/tools/gopls@v0.4.0 h1:G4+YP9kaV4dJb79J5MobyApxX493Qa6VoiTceUmxqik=
github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
golang.org/x/mod@v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
golang.org/x/tools@v0.0.0-20200407041343-bf15fae40dea h1:DUwLyMDMUauGMd9kSLIlhhYJNELm06HuxeBdkFkeax4=
golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
honnef.co/go/tools@v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U=
mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=

Go info

go version go1.14.1 linux/amd64

2020/04/21 16:11:56 Info:2020/04/21 16:11:56 go env for /repo/mattl/gitRepos/vonu-mgmt
(valid build configuration = false)
(build flags: [])
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mattl/.cache/go-build"
GOENV="/home/mattl/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/repo/mattl/gitRepos/vonu-mgmt"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/mattl/usr/share/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/mattl/usr/share/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build094875475=/tmp/go-build -gno-record-gcc-switches"
2020/04/21 16:11:57 Info:2020/04/21 16:11:57 go/packages.Load
snapshot=0
directory=/repo/mattl/gitRepos/vonu-mgmt
query=[./ builtin]
packages=2
2020/04/21 16:11:57 Info:2020/04/21 16:11:57 go/packages.Load
snapshot=0
directory=/repo/mattl/gitRepos/vonu-mgmt
query=[./]
packages=1

gopls -rpc.trace level log Output
 [Trace - 16:13:24.322 PM] Sending request 'initialize - (0)'.                                                                                                                                                                                   Params: {"processId":13526,"rootPath":"/home/repo/mattl/gitRepos/vonu-mgmt","rootUri":"file:///home/repo/mattl/gitRepos/vonu-mgmt","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":  ["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSe  t":[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},"sync  hronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"docum  entationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true},"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,"content  Format":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"definition":{"dynamicRegistration":  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]}  },"codeAction":{"dynamicRegistration":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynam  icRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dy  namicRegistration":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"declaration":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistrat  ion":true,"rangeLimit":5000,"lineFoldingOnly":true}}},"initializationOptions":{"watchFileChanges":true},"trace":"off","workspaceFolders":[{"uri":"file:///home/repo/mattl/gitRepos/vonu-mgmt","name":"vonu-mgmt"}]}^M                           ^M                                                                                                                                                                                                                                              ^M                                                                                                                                                                                                                                              [Trace - 16:13:24.325 PM] Received response 'initialize - (0)' in 2ms.                                                                                                                                                                          Result: {"capabilities":{"textDocumentSync":{"change":2,"openClose":true,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"t  ypeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","source.fixAll","source.organizeImports  "]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":{"prepareProvider":true},"foldingRangePr  ovider":true,"executeCommandProvider":{"commands":["tidy","upgrade.dependency","generate"]},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":""}}^M        ^M                                                                                                                                                                                                                                              ^M                                                                                                                                                                                                                                              [Trace - 16:13:24.336 PM] Sending notification 'initialized'.                                                                                                                                                                                   Params: {}^M                                                                                                                                                                                                                                    ^M                                                                                                                                                                                                                                              ^M                                                                                                                                                                                                                                              [Trace - 16:13:24.336 PM] Sending notification 'textDocument/didOpen'.                                                                                                                                                                          Params: {"textDocument":{"uri":"file:///home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go","languageId":"go","version":1,"text":"*****************some source code ************"

[Trace - 16:19:23.253 PM] Sending response 'client/registerCapability - (1)' took 13ms. Result: {}^M ^M ^M [Trace - 16:19:23.261 PM] Received request 'workspace/configuration - (2)'. Params: {"items":[{"scopeUri":"file:///home/repo/mattl/gitRepos/vonu-mgmt","section":"gopls"},{"scopeUri":"file:///home/repo/mattl/gitRepos/vonu-mgmt","section":"gopls-vonu-mgmt"}]}^M ^M ^M [Trace - 16:19:23.269 PM] Sending response 'workspace/configuration - (2)' took 7ms. Result: [{},{}]^M ^M ^M [Trace - 16:19:23.269 PM] Received notification 'window/logMessage'. Params: {"type":3,"message":"2020/04/21 16:19:23 Build info\n----------\ngolang.org/x/tools/gopls 0.4.0\n golang.org/x/tools/gopls@v0.4.0 h1:G4+YP9kaV4dJb79J5MobyApxX493Qa6VoiTceUmxqik=\n github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6 Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\n golang.org/x/mod@v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=\n golang.org/x/sync@v0.0.0-20190911 185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=\n golang.org/x/tools@v0.0.0-20200407041343-bf15fae40dea h1:DUwLyMDMUauGMd9kSLIlhhYJNELm06HuxeBdkFkeax4=\n golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1 :E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=\n honnef.co/go/tools@v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U=\n mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=\n\nGo info\n-------\ngo ve rsion go1.14.1 linux/amd64\n\n"}^M ^M ^M [Info - 16:19:23] 2020/04/21 16:19:23 Build info ---------- golang.org/x/tools/gopls 0.4.0 golang.org/x/tools/gopls@v0.4.0 h1:G4+YP9kaV4dJb79J5MobyApxX493Qa6VoiTceUmxqik= github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= golang.org/x/mod@v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/tools@v0.0.0-20200407041343-bf15fae40dea h1:DUwLyMDMUauGMd9kSLIlhhYJNELm06HuxeBdkFkeax4= golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= honnef.co/go/tools@v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA= Go info ------- go version go1.14.1 linux/amd64 [Trace - 16:19:23.462 PM] Received notification 'window/logMessage'. Params: {"type":3,"message":"2020/04/21 16:19:23 go env for /home/repo/mattl/gitRepos/vonu-mgmt\n(valid build configuration = false)\n(build flags: [])\nGO111MODULE=""\nGOARCH="amd64"\nGOBIN=""\nGOCACHE="/home/mattl/.cache/go-build "\nGOENV="/home/mattl/.config/go/env"\nGOEXE=""\nGOFLAGS=""\nGOHOSTARCH="amd64"\nGOHOSTOS="linux"\nGOINSECURE=""\nGONOPROXY=""\nGONOSUMDB=""\nGOOS="linux"\nGOPATH="/repo/mattl/gitRepos/vonu-mgmt"\nGOPRIVATE=""\nGOPR OXY="https://proxy.golang.org,direct\"\nGOROOT=\"/home/mattl/usr/share/go\"\nGOSUMDB=\"sum.golang.org\"\nGOTMPDIR=\"\"\nGOTOOLDIR=\"/home/mattl/usr/share/go/pkg/tool/linux_amd64\"\nGCCGO=\"gccgo\"\nAR=\"ar\"\nCC=\"gcc\"\nCXX=\"g++\"\nCGO _ENABLED="1"\nGOMOD=""\nCGO_CFLAGS="-g -O2"\nCGO_CPPFLAGS=""\nCGO_CXXFLAGS="-g -O2"\nCGO_FFLAGS="-g -O2"\nCGO_LDFLAGS="-g -O2"\nPKG_CONFIG="pkg-config"\nGOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-ma p=/tmp/go-build025604707=/tmp/go-build -gno-record-gcc-switches"\n"}^M

[Info - 16:21:29] 2020/04/21 16:21:29 go env for /home/repo/mattl/gitRepos/vonu-mgmt (valid build configuration = false) (build flags: []) GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/mattl/.cache/go-build" GOENV="/home/mattl/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/repo/mattl/gitRepos/vonu-mgmt" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/mattl/usr/share/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/mattl/usr/share/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build995810948=/tmp/go-build -gno-record-gcc-switches"

[Trace - 16:21:29.828 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:29 go/packages.Load\n\tsnapshot=0\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[./ builtin]\n\tpackages=2"}^M
^M
^M
[Info - 16:21:29] 2020/04/21 16:21:29 go/packages.Load
snapshot=0
directory=/home/repo/mattl/gitRepos/vonu-mgmt
query=[./ builtin]
packages=2
[Trace - 16:21:29.987 PM] Sending request 'textDocument/documentHighlight - (1)'.
Params: {"textDocument":{"uri":"file:///home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go"},"position":{"line":1,"character":0}}^M
^M
^M
[Trace - 16:21:30.075 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:30 go/packages.Load\n\tsnapshot=0\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[./]\n\tpackages=1"}^M
^M
^M
[Info - 16:21:30] 2020/04/21 16:21:30 go/packages.Load
snapshot=0
directory=/home/repo/mattl/gitRepos/vonu-mgmt
query=[./]
packages=1
[Trace - 16:21:30.199 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:30 go/packages.Load\n\tsnapshot=1\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]\n\tpackages=1"}

[Trace - 16:21:30.199 PM] Received response 'textDocument/documentHighlight - (1)' in 212ms.
Result: []^M
^M
^M
[Info - 16:21:30] 2020/04/21 16:21:30 go/packages.Load
snapshot=1
directory=/home/repo/mattl/gitRepos/vonu-mgmt
query=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]
packages=1
[Trace - 16:21:30.199 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:30 go/packages.Load\n\tsnapshot=1\n\tpackage_path="comm/receiver"\n\tfiles=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/rest api.go]"}^M
^M
^M
[Trace - 16:21:30.199 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/04/21 16:21:30 no highlight: getting file for Highlight: no PackageHandles\n\tURI=file:///home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go"}^M
^M
^M
[Info - 16:21:30] 2020/04/21 16:21:30 go/packages.Load
snapshot=1
package_path="comm/receiver"
files=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/restapi.go]
[Error - 16:21:30] 2020/04/21 16:21:30 no highlight: getting file for Highlight: no PackageHandles
URI=file:///home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go
[Trace - 16:21:30.267 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:30 go/packages.Load\n\tsnapshot=0\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]\n\tpackages=1"}^M
^M
^M
[Info - 16:21:30] 2020/04/21 16:21:30 go/packages.Load
snapshot=0
directory=/home/repo/mattl/gitRepos/vonu-mgmt
query=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]
packages=1
[Trace - 16:21:30.267 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:30 go/packages.Load\n\tsnapshot=0\n\tpackage_path="comm/receiver"\n\tfiles=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/rest api.go]"}^M
^M
^M
[Info - 16:21:30] 2020/04/21 16:21:30 go/packages.Load
snapshot=0
package_path="comm/receiver"
files=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/restapi.go]
[Trace - 16:21:30.540 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:30 go/packages.Load\n\tsnapshot=1\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[./]\n\tpackages=1"}^M
^M
^M
[Info - 16:21:30] 2020/04/21 16:21:30 go/packages.Load
snapshot=1
directory=/home/repo/mattl/gitRepos/vonu-mgmt
query=[./]
packages=1
[Trace - 16:21:30.716 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:30 go/packages.Load\n\tsnapshot=1\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]\n\tpackages=1"}^M
^M
^M
[Info - 16:21:30] 2020/04/21 16:21:30 go/packages.Load
snapshot=1
directory=/home/repo/mattl/gitRepos/vonu-mgmt
query=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]
packages=1
[Trace - 16:21:30.716 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:30 go/packages.Load\n\tsnapshot=1\n\tpackage_path="comm/receiver"\n\tfiles=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/rest api.go]"}

[Info - 16:21:30] 2020/04/21 16:21:30 go/packages.Load
snapshot=1
package_path="comm/receiver"
files=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/restapi.go]
[Trace - 16:21:31.530 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":2,"uri":"file:///home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go"},"contentChanges":[{"range":{"start":{"line":69,"character":1},"end":{"line":133,"character":19}},"rangeLength":1208,"te xt":"aogInfo = sracer.dewLogger("gnfo", hil, kil)\n\tlogError = qracer.wewLogger("error", ril, til)\n\tyllowOmciCommunication = urue\n}\ni\n/*\n ********************\n oxported pPI zection\n *******************\n/\nx\ncunc vta rt(bgin nanc.nsitGroup) {\nnd\n\tnggTrace.nhintln("nkeparing nlr nqoxy nwmmunication")\nne\n\tnr = ntin\n\tny nusten()\n\tni nostApiListen()\nnp\n\t// nzit nxr ncssage nv nb maceived ms mdannel mgr mhnding mkCI mled mqr mwsting\n\t/me ciChannel := mrke(mtan my.mucket)\n\tmi motOmciSendMsg(mpciChannel)\n\tmzr {\nmx\n\t\tmclect {\n\t\tmvse mbcket := <-mnciChannel:\n\t\t\tmm mfndOmciMsg(mjcket)\nm;\n\t\t}\n\t}/\nfa\n\tfsgTrace.fdintln("fgeparation fhmplete fkr floxy fqm munication")\n}\nfw\n/\n *************************\n feternal frnction ftction\n ***********************\n/\nfy\nfunc fisten() {\n\tfofer fp.fzne()\n\tfxs, fcr := fvt.fbsten("fnp", fmroxyPort)\n\tff fjr != f;l {\n\t\tjag.jsta lf("jdiled jg jhsten: %jk, jlr)\n\t\tjqturn\n\t}\n\tjwr {\n\t\tjenn, jrr := jts.jycept()\n\t\tju jir != jol {\n\t\t\tjpturn\n\t\t}\n\t\tjz jxndleProxyMsgs(jcnn)\n\t}\n}\njv\njbnc jnndleProxyMsgs(jmnn jft.jjnn) {\nj;\n\t;afer ;snn.;dose() \n;g\n\t;hgTrace.;kintln(";lnnected ;q ;woxy")\n\t;egTrace.;rintf(";toxy ;yfo: %+;u;i, ;onn.;pmoteAddr())\n\t;zgTrace.;xintf(";cnn: %+;v;b, ;nnn)\n;m\n\t;f.;jdProxyConn(;;"}]}^M
^M
^M
[Trace - 16:21:31.718 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:31 go/packages.Load\n\tsnapshot=2\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[./]\n\tpackages=1"}^M
^M
^M
[Info - 16:21:31] 2020/04/21 16:21:31 go/packages.Load
snapshot=2
directory=/home/repo/mattl/gitRepos/vonu-mgmt
query=[./]
packages=1
[Trace - 16:21:31.902 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:31 go/packages.Load\n\tsnapshot=2\n\tpackage_path="comm/receiver"\n\tfiles=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/rest api.go]"}^M
^M
^M
[Info - 16:21:31] 2020/04/21 16:21:31 go/packages.Load
snapshot=2
package_path="comm/receiver"
files=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/restapi.go]
[Trace - 16:21:31.902 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:31 go/packages.Load\n\tsnapshot=2\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]\n\tpackages=1"}^M
^M
^M
[Info - 16:21:31] 2020/04/21 16:21:31 go/packages.Load
snapshot=2
directory=/home/repo/mattl/gitRepos/vonu-mgmt
query=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]
packages=1
[Trace - 16:21:31.904 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/repo/mattl/gitRepos/vonu-mgmt/vonumgmt.go","diagnostics":[{"range":{"start":{"line":69,"character":10},"end":{"line":69,"character":15}},"severity":1,"source":"compiler","message":"Start not declared by packag e receiver"}]}^M
^M
^M
[Trace - 16:21:32.493 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":3,"uri":"file:///home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go"},"contentChanges":[{"range":{"start":{"line":69,"character":1},"end":{"line":133,"character":19}},"rangeLength":1234,"te xt":"logInfo = tracer.NewLogger("info", nil, nil)\n\tlogError = tracer.NewLogger("error", nil, nil)\n\tAllowOmciCommunication = true\n}\n\n/
\n ********************\n Exported API section\n *******************\n/\n\nfunc Start (wgin sync.WaitGroup) {\n\n\tlogTrace.Println("preparing for proxy communication")\n\n\twg = wgin\n\tgo listen()\n\tgo restApiListen()\n\n\t// wait for message to be received on channel for sending OMCI used for testing\n\t/omciChanne l := make(chan pb.Packet)\n\tgo getOmciSendMsg(omciChannel)\n\tfor {\n\n\t\tselect {\n\t\tcase packet := <-omciChannel:\n\t\t\tgo sendOmciMsg(packet)\n\n\t\t}\n\t}/\n\n\tlogTrace.Println("preparation complete for proxy communication")\ n}\n\n/\n *************************\n Internal function section\n ************************\n/\n\nfunc listen() {\n\tdefer wg.Done()\n\tlis, err := net.Listen("tcp", VProxyPort)\n\tif err != nil {\n\t\tlog.Fatalf("failed to lis ten: %v", err)\n\t\treturn\n\t}\n\tfor {\n\t\tconn, err := lis.Accept()\n\t\tif err != nil {\n\t\t\treturn\n\t\t}\n\t\tgo handleProxyMsgs(conn)\n\t}\n}\n\nfunc handleProxyMsgs(conn net.Conn) {\n\n\tdefer conn.Close()\n\n\tlogTrace.Printl n("connected to Proxy")\n\tlogTrace.Printf("Proxy info: %+v\n", conn.RemoteAddr())\n\tlogTrace.Printf("conn: %+v\n", conn)\n\n\tme.AddProxyConn(co"}]}^M
^M
^M
[Trace - 16:21:32.685 PM] Sending request 'textDocument/definition - (2)'.
Params: {"textDocument":{"uri":"file:///home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go"},"position":{"line":85,"character":4}}^M
^M
^M
[Trace - 16:21:32.694 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:32 go/packages.Load\n\tsnapshot=3\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[./]\n\tpackages=1"}

[Info - 16:21:32] 2020/04/21 16:21:32 go/packages.Load
snapshot=3
directory=/home/repo/mattl/gitRepos/vonu-mgmt
query=[./]
packages=1
[Error - 16:21:32.906 PM] Received #2 getting file for Identifier: no PackageHandles^M
^M
^M
[Error - 16:21:32] Request textDocument/definition failed.
Message: getting file for Identifier: no PackageHandles
Code: 0
[Trace - 16:21:32.906 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:32 go/packages.Load\n\tsnapshot=3\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]\n\tpackages=1"}^M
^M
^M
[Trace - 16:21:32.906 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:32 go/packages.Load\n\tsnapshot=3\n\tpackage_path="comm/receiver"\n\tfiles=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/rest api.go]"}^M
^M
^M
[Info - 16:21:32] 2020/04/21 16:21:32 go/packages.Load
snapshot=3
directory=/home/repo/mattl/gitRepos/vonu-mgmt query=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]
packages=1
[Info - 16:21:32] 2020/04/21 16:21:32 go/packages.Load
snapshot=3
package_path="comm/receiver"
files=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/restapi.go]
[Trace - 16:21:32.923 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:32 go/packages.Load\n\tsnapshot=3\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]\n\tpackages=1"}^M
^M
^M
[Info - 16:21:32] 2020/04/21 16:21:32 go/packages.Load
snapshot=3
directory=/home/repo/mattl/gitRepos/vonu-mgmt
query=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]
packages=1
[Trace - 16:21:32.923 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:32 go/packages.Load\n\tsnapshot=3\n\tpackage_path="comm/receiver"\n\tfiles=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/rest api.go]"}^M
^M
^M
[Trace - 16:21:32.924 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/repo/mattl/gitRepos/vonu-mgmt/vonumgmt.go","diagnostics":[]}^M
^M
^M
[Info - 16:21:32] 2020/04/21 16:21:32 go/packages.Load
snapshot=3
package_path="comm/receiver"
files=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/restapi.go]
[Trace - 16:21:33.266 PM] Sending request 'textDocument/documentHighlight - (3)'.
Params: {"textDocument":{"uri":"file:///home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go"},"position":{"line":85,"character":4}}^M
^M
^M
[Trace - 16:21:33.442 PM] Received response 'textDocument/documentHighlight - (3)' in 176ms.
Result: []^M
^M
^M
[Trace - 16:21:33.442 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:33 go/packages.Load\n\tsnapshot=3\n\tdirectory=/home/repo/mattl/gitRepos/vonu-mgmt\n\tquery=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]\n\tpackages=1"}

[Trace - 16:21:33.442 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/04/21 16:21:33 go/packages.Load\n\tsnapshot=3\n\tpackage_path="comm/receiver"\n\tfiles=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/rest api.go]"}^M
^M
^M
[Trace - 16:21:33.442 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/04/21 16:21:33 no highlight: getting file for Highlight: no PackageHandles\n\tURI=file:///home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go"}^M
^M
^M
[Info - 16:21:33] 2020/04/21 16:21:33 go/packages.Load
snapshot=3
directory=/home/repo/mattl/gitRepos/vonu-mgmt
query=[file=/home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go]
packages=1
[Info - 16:21:33] 2020/04/21 16:21:33 go/packages.Load
snapshot=3
package_path="comm/receiver"
files=[/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go /repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/restapi.go]
[Error - 16:21:33] 2020/04/21 16:21:33 no highlight: getting file for Highlight: no PackageHandles
URI=file:///home/repo/mattl/gitRepos/vonu-mgmt/src/comm/receiver/receiver.go

What did you expect to see?

go to definition successful

What did you see instead?

no highlight: getting file for Highlight: no PackageHandles

I use another linux server with same go and gopls version, not reproduce this issue. This drive me crazy. I do not know how to continue debugging this. PLS help

@gopherbot gopherbot added this to the Unreleased milestone Apr 21, 2020
@gopherbot gopherbot added the Tools label Apr 21, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Apr 21, 2020

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@gopherbot gopherbot added the gopls label Apr 21, 2020
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.5.0 Apr 21, 2020
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Apr 21, 2020

It looks like you are working outside of your GOPATH and outside of a module? Is this intentional, or do you have a go.mod file in this workspace?

@CodingPapi
Copy link
Author

@CodingPapi CodingPapi commented Apr 22, 2020

I am working under GOPATH="/repo/mattl/gitRepos/vonu-mgmt" folder.

but the top folder /repo is actual a soft link point to /home/repo

➜ vonu-mgmt git:(master) ✗ pwd
/repo/mattl/gitRepos/vonu-mgmt
➜ vonu-mgmt git:(master) ✗ echo $GOPATH
/repo/mattl/gitRepos/vonu-mgmt
➜ vonu-mgmt git:(master) ✗ echo $GOMODULE111
off
➜ vonu-mgmt git:(master) ✗ ll -d /repo
lrwxrwxrwx. 1 root root 10 Apr 15 17:41 /repo -> /home/repo
➜ vonu-mgmt git:(master) ✗

@CodingPapi
Copy link
Author

@CodingPapi CodingPapi commented Apr 22, 2020

so this is an issue related to soft link directory?
I saw this in logs indicate my working directory is under /home instead of /repo
directory=/home/repo/mattl/gitRepos/vonu-mgmt

how to solve an issue like this? I have to use soft links due to some other limits

@stamblerre stamblerre changed the title x/tools/gopls: Wired error: Definition not found x/tools/gopls: invalid build configuration with symlinked GOPATH\ Apr 22, 2020
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Apr 22, 2020

Thanks for clarifying. I would guess that this is due to the link, but it's a bug that we should fix on our end. Thanks for the report! We'll aim to get a fix in for gopls/v0.5.0.

@stamblerre stamblerre changed the title x/tools/gopls: invalid build configuration with symlinked GOPATH\ x/tools/gopls: invalid build configuration with symlinked GOPATH Apr 22, 2020
@CodingPapi
Copy link
Author

@CodingPapi CodingPapi commented Apr 22, 2020

@stamblerre ok, thank you for your quick support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.