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: Implement action should ignore importing the current package #61830

Closed
tttoad opened this issue Aug 8, 2023 · 8 comments
Closed
Labels
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

@tttoad
Copy link

tttoad commented Aug 8, 2023

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

$ go version go1.19 darwin/arm64

Build info
----------
command-line-arguments v0.13.1
    @
    github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
    github.com/google/go-cmp@v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/exp@v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA=
    golang.org/x/exp/typeparams@v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW
6Y=
    golang.org/x/mod@v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
    golang.org/x/sync@v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
    golang.org/x/sys@v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
    golang.org/x/text@v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
    golang.org/x/tools@v0.11.2-0.20230801165449-23c7f589706c h1:YilyjKn3EDn6X+x+kP+4REeEtG3WeM52dJAr7AWzVrQ=
    golang.org/x/tools/gopls@(devel)
    golang.org/x/vuln@v0.0.0-20230110180137-6ad3e3d07815 h1:A9kONVi4+AnuOr1dopsibH6hLi1Huy54cbeJxnq4vmU=
    honnef.co/go/tools@v0.4.2 h1:6qXr+R5w+ktL5UkwEbPp+fEvfyoMPche6GkOpGHZcLc=
    mvdan.cc/gofumpt@v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=
    mvdan.cc/xurls/v2@v2.4.0 h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc=
go: go1.19


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
```
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/toad/Library/Caches/go-build"
GOENV="/Users/toad/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/toad/work/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/toad/work"
GOPRIVATE=""
GOPROXY="https://goproxy.io,direct"
GOROOT="/Users/toad/go/go1.19"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/toad/go/go1.19/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/toad/work/tools/gopls/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"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-pre
fix-map=/var/folders/g1/tgmnlrdn3vxgv08kdgh9vpkw0000gn/T/go-build3656177323=/tmp/go-build -gno-record-gcc-switc
hes -fno-common"
```

What did you do?

exec Implement action.

What did you expect to see?

2023-08-08.10.50.30.mov

What did you see instead?

2023-08-08.11.02.44.mov
@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 Aug 8, 2023
@gopherbot gopherbot added this to the Unreleased milestone Aug 8, 2023
@findleyr
Copy link
Contributor

findleyr commented Aug 8, 2023

Thanks for the report. This is clearly a bug; prioritizing for the next release.

@findleyr findleyr modified the milestones: Unreleased, gopls/v0.13.2 Aug 8, 2023
@gopherbot
Copy link

Change https://go.dev/cl/518915 mentions this issue: gopls/internal/lsp/source: don't qualify local types in stubs

@findleyr
Copy link
Contributor

Sorry, I'm not used to noticing pull requests, and didn't see that you'd already mailed the fix (and so created one myself 🤦).

Let's merge yours first, if you can address the commit message. I'll then merge my test.

@gopherbot
Copy link

Change https://go.dev/cl/519075 mentions this issue: gopls: stubbed methods shouldn't qualify the current package

@tttoad
Copy link
Author

tttoad commented Aug 12, 2023

@findleyr Sorry, I didn't bother to read through the contribution guidelines (so I didn't know to send an email) . I've resubmitted the changes as per the documentation. (This is my first time submitting code 🙈)

@findleyr findleyr modified the milestones: gopls/v0.13.2, gopls/v0.14.0 Aug 14, 2023
@findleyr
Copy link
Contributor

Hi @tttoad, you need to edit the title and description of your commit message to affect the CL description in Gerrit. Please see more information here:

golang/tools#447 (comment)

Once that is done, I will merge your change.

@gopherbot
Copy link

Change https://go.dev/cl/516758 mentions this issue: gopls: stubbed methods shouldn't qualify the current package

@tttoad
Copy link
Author

tttoad commented Aug 17, 2023

@findleyr done. PTAL.

gopherbot pushed a commit to golang/tools that referenced this issue Aug 18, 2023
For golang/go#61830

Change-Id: Ic30cc528ecfff299a1fc90a17b4e7ccbf5249a8a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/518915
Auto-Submit: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

Successfully merging a pull request may close this issue.

3 participants