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: 'span' should support the import module path with upper-case #34230

Closed
movie-travel-code opened this issue Sep 11, 2019 · 3 comments
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. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@movie-travel-code
Copy link

movie-travel-code commented Sep 11, 2019

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

$ go version
go version go1.12 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/henrywong/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/henrywong/workspace/gopath"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/fm/bk0wqlkj523gdp9pbtnyvxmm0000gn/T/go-build295263798=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Clone https://github.com/nytimes/gizmo and put gizmo under module mode, jump to definition for gizmo/pubsub/kafka/config.go: Config *sarama.Config.

What did you expect to see?

The expected trace log for the definition jump.

[Trace - 6:58:12 PM] Received response 'textDocument/definition - (5)' in 75ms.
Params: [{"uri":"file:///Users/henrywong/workspace/gopath/pkg/mod/github.com/!shopify/sarama@v1.23.1/config.go","range":{"start":{"line":20,"character":5},"end":{"line":20,"character":11}}}]

What did you see instead?

There is %21 in the uri. %21 corresponds to "!", the exclamation mark is intended, see #26456.

[Trace - 6:58:12 PM] Received response 'textDocument/definition - (5)' in 75ms.
Params: [{"uri":"file:///Users/henrywong/workspace/gopath/pkg/mod/github.com/%21shopify/sarama@v1.23.1/config.go","range":{"start":{"line":20,"character":5},"end":{"line":20,"character":11}}}]

vscode-go can handle this because of https://github.com/microsoft/vscode/blob/master/src/vs/base/common/uri.ts#L478. However I think it would be better convert the %21 back to ! when gopls reply the result to the clients.

@gopherbot gopherbot added this to the Unreleased milestone Sep 11, 2019
@gopherbot
Copy link

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

@gopherbot gopherbot added gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Sep 11, 2019
@stamblerre
Copy link
Contributor

Does CL 195618 fix this for you?

@stamblerre stamblerre added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Sep 17, 2019
@movie-travel-code
Copy link
Author

movie-travel-code commented Sep 17, 2019

It works, thanks!

@golang golang locked and limited conversation to collaborators Sep 16, 2020
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. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants