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/cmd/gopls: Autocomplete shows irrelevant members #34134

Closed
gencer opened this issue Sep 6, 2019 · 5 comments
Closed

x/tools/cmd/gopls: Autocomplete shows irrelevant members #34134

gencer opened this issue Sep 6, 2019 · 5 comments

Comments

@gencer
Copy link

@gencer gencer commented Sep 6, 2019

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

$ go version
go version go1.13 windows/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
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\gence\AppData\Local\go-build
set GOENV=C:\Users\gence\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\Go\
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-LD:\Go\/src/mingw-4.7.2-64 -lchilkatExt-9.5.0 -lws2_32 -lstdc++
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\gence\AppData\Local\Temp\go-build825157682=/tmp/go-build -gno-record-gcc-switches

Note: In vscode, GO111MODULE is on. Outside of vscode, its gopath-ed.

What did you do?

Trying to autocomplete any object, class or method.

What did you expect to see?

When I type a struct, I should gets its own members only.

What did you see instead?

Everything.

Screencast:

4

In gopls logs i see those lines:


[Error - 04:56:15] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:220:40: expected selector or type assertion, found ')' (and 27 more errors)
  Code: 0 
[Error - 04:56:15] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:220:40: expected selector or type assertion, found ')' (and 27 more errors)
  Code: 0 
[Error - 04:56:17] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:220:40: expected selector or type assertion, found ')' (and 27 more errors)
  Code: 0 
[Error - 04:56:17] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:220:40: expected selector or type assertion, found ')' (and 27 more errors)
  Code: 0 
[Error - 04:56:20] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:220:40: expected selector or type assertion, found ')' (and 27 more errors)
  Code: 0 
[Error - 04:56:20] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:220:40: expected selector or type assertion, found ')' (and 27 more errors)
  Code: 0 

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

@gopherbot gopherbot commented Sep 6, 2019

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 the gopls label Sep 6, 2019
@gencer
Copy link
Author

@gencer gencer commented Sep 6, 2019

One more screenshot:

5

Logs:

[Error - 05:09:59] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 15 more errors)
  Code: 0 
[Error - 05:09:59] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 15 more errors)
  Code: 0 
[Error - 05:10:00] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 15 more errors)
  Code: 0 
2019/09/06 05:10:00 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:00] 2019/09/06 05:10:00 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:00] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:00] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:01 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:01] 2019/09/06 05:10:01 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:01] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:01] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:01 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:01] 2019/09/06 05:10:01 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:01] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:01] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:02 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:02] 2019/09/06 05:10:02 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:02] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:02] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:02 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:02] 2019/09/06 05:10:02 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:02] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:03] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:03 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:03] 2019/09/06 05:10:03 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
2019/09/06 05:10:03 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:03] 2019/09/06 05:10:03 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:03] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:03] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:05 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:05] 2019/09/06 05:10:05 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:05] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:05] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:05 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:05] 2019/09/06 05:10:05 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:05] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:05 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:05] 2019/09/06 05:10:05 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
2019/09/06 05:10:06 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:06] 2019/09/06 05:10:06 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:06] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:06] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:06 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:06] 2019/09/06 05:10:06 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:07] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:07] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:07 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:07] 2019/09/06 05:10:07 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:07] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:07] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:10] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 15 more errors)
  Code: 0 
[Error - 05:10:11] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:11] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:11] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:13] Request textDocument/definition failed.
  Message: no identifier found for d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:15
  Code: 0 
[Error - 05:10:13] Request textDocument/definition failed.
  Message: no identifier found for d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:15
  Code: 0 
[Error - 05:10:13] Request textDocument/definition failed.
  Message: no identifier found for d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:19
  Code: 0 
[Error - 05:10:14] Request textDocument/definition failed.
  Message: no identifier found for d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:19
  Code: 0 
[Error - 05:10:18] Request textDocument/definition failed.
  Message: no identifier found for d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:19
  Code: 0 
2019/09/06 05:10:19 no highlight: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:19 is not an identifier
	Span = d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:19
[Error - 05:10:19] 2019/09/06 05:10:19 no highlight: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:19 is not an identifier
	Span = d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:19
[Error - 05:10:19] Request textDocument/definition failed.
  Message: no identifier found for d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:19
  Code: 0 
[Error - 05:10:19] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:19] Request textDocument/definition failed.
  Message: no identifier found for d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:19
  Code: 0 
[Error - 05:10:19] Request textDocument/definition failed.
  Message: no identifier found for d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:17
  Code: 0 
[Error - 05:10:19] Request textDocument/definition failed.
  Message: no identifier found for d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:19
  Code: 0 
[Error - 05:10:19] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:20] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:21] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:21] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:21] Request textDocument/formatting failed.
  Message: 222:4: expected operand, found '}' (and 3 more errors)
  Code: 0 
[Error - 05:10:23] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:24 no highlight: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:21 is not an identifier
	Span = d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:21
[Error - 05:10:24] 2019/09/06 05:10:24 no highlight: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:21 is not an identifier
	Span = d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:21
[Error - 05:10:24] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:25] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:25] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:25] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:26] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:26] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:26] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:26] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:27 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:27] 2019/09/06 05:10:27 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:27] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:27 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:27] 2019/09/06 05:10:27 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
2019/09/06 05:10:28 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:28] 2019/09/06 05:10:28 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:28] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 15 more errors)
  Code: 0 
2019/09/06 05:10:28 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:28] 2019/09/06 05:10:28 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
2019/09/06 05:10:28 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:28] 2019/09/06 05:10:28 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:28] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:28] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:29 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:29] 2019/09/06 05:10:29 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:29] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:30] Request textDocument/definition failed.
  Message: no identifier found for d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:221:13
  Code: 0 
2019/09/06 05:10:44 no highlight: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:220:17 is not an identifier
	Span = d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:220:17
[Error - 05:10:44] 2019/09/06 05:10:44 no highlight: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:220:17 is not an identifier
	Span = d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:220:17
[Error - 05:10:46] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 15 more errors)
  Code: 0 
[Error - 05:10:46] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 15 more errors)
  Code: 0 
[Error - 05:10:46] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 15 more errors)
  Code: 0 
2019/09/06 05:10:46 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:46] 2019/09/06 05:10:46 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:47] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:47] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
2019/09/06 05:10:47 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:47] 2019/09/06 05:10:47 failed to fix AST: unable to parse defer or go from *ast.BadStmt: no expr in func() {
		for d: 2:8: expected operand, found 'EOF'
[Error - 05:10:47] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:47] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:47] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 15 more errors)
  Code: 0 
[Error - 05:10:48] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:48] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:49] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:49] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:57] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:58] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:58] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:58] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:59] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:59] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:59] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:10:59] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:11:00] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:11:00] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 15 more errors)
  Code: 0 
[Error - 05:11:00] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 15 more errors)
  Code: 0 
[Error - 05:11:01] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:11:01] Request textDocument/codeAction failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:11:01] Request textDocument/foldingRange failed.
  Message: d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:222:4: expected operand, found '}' (and 14 more errors)
  Code: 0 
[Error - 05:11:02] Request textDocument/definition failed.
  Message: no identifier found for d:\ASPACK\FACILITY\gitsby\ws\rabbit.go:220:27
  Code: 0 
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Sep 7, 2019

Is this code inside a defer or go statement? If so, this is a duplicate of #29313. A fix for this issue has been sent out for review so it should be fixed soon.

@gencer
Copy link
Author

@gencer gencer commented Sep 7, 2019

Hi Rebecca, Yes, it is indeed inside of go. Thank you for quick reply. This explains why i get correct autocomplete on regular .go files which has no any goroutine's.

-- I have subscribed that issue now.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Sep 7, 2019

Perfect, I'll close this as a duplicate for now. Once https://go-review.googlesource.com/c/tools/+/193997 is merged this will be resolved.

@stamblerre stamblerre closed this Sep 7, 2019
@golang golang locked and limited conversation to collaborators Sep 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.