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: file is not part of package #33011

Closed
jadekler opened this issue Jul 9, 2019 · 38 comments
Closed

x/tools/cmd/gopls: file is not part of package #33011

jadekler opened this issue Jul 9, 2019 · 38 comments

Comments

@jadekler
Copy link
Member

@jadekler jadekler commented Jul 9, 2019

Reproduces with gopls@master and gopls@latest:

golang.org/x/tools/gopls v0.1.0
    golang.org/x/tools/gopls@v0.1.2-0.20190708203411-c8855242db9c h1:qFHl9H1pFOvam5c7rRNiSVPuASu5sS/VNZUj7KNAyGI=

and

$ gopls version
golang.org/x/tools/gopls v0.1.0
    golang.org/x/tools/gopls@v0.1.1 h1:mU/O8r53RjzdZfkqmFOX4iEt8PJxTPXyLdiuQNa27OE=

Steps to reproduce:

  1. Create folder
  2. Create a.go:
    package main
    
    type whatever struct{}
    
  3. Create b.go:
    package main
    
    import "fmt"
    
    func main() {
     w := whatever{}
     fmt.Println("whatever", w)
    }
    

This compiles and runs fine, but in vscode with gopls I get a red squiggly over package with the error:

file:///usr/local/google/home/deklerk/workspace/interview-questions/foo/b.go is not part of a package LSP

@gopherbot gopherbot added the gopls label Jul 9, 2019
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 9, 2019

Are you able to reproduce this if the package name is not main?

@jadekler
Copy link
Member Author

@jadekler jadekler commented Jul 9, 2019

IIRC yes - I actually found it on a non-main package and recreated it with main.

@odeke-em odeke-em changed the title gopls: file is not part of package x/tools/cmd/gopls: file is not part of package Jul 10, 2019
@gopherbot gopherbot added this to the Unreleased milestone Jul 10, 2019
@llbec
Copy link

@llbec llbec commented Jul 10, 2019

I got this error too. This error has gone when I reopen vscode, but it will come out at an other new open file.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 10, 2019

@llbox: What version of gopls are you using (gopls version)? Can you update to the latest version (go get golang.org/x/tools/gopls@latest) and confirm that you still see this issue?

@mthie
Copy link

@mthie mthie commented Jul 10, 2019

$ gopls version
version v0.1.3-cmd.gopls, built in $GOPATH mode

Even after git pull on master branch the message still occurs. Also in vim-go.

@jamiebarnett
Copy link

@jamiebarnett jamiebarnett commented Jul 11, 2019

I am also having this issue. Compiles fine but get an error that won't go away unless VS Code is restarted. from VS Code gopls log;

[Error - 10:29:21] unable to check package for file:///xxxxx/pkg/sites/sites.go: loadParseTypeCheck: no package found for /xxxxx/pkg/sites/sites.go
[Error - 10:29:21] Request textDocument/hover failed.
  Message: no AST for file:///xxxxx/pkg/sites/sites.go
  Code: 0 
version v0.1.0-cmd.gopls, built in $GOPATH mode
@linguohua
Copy link

@linguohua linguohua commented Jul 11, 2019

version v0.1.3-cmd.gopls, built in $GOPATH mode.
Has the same problem both on windows and linux

@mthie
Copy link

@mthie mthie commented Jul 11, 2019

When I check it manually, not via IDE:

/my/path $ gopls check myfile.go

2019/07/11 15:28:58 Error:unable to check package for file:///my/path/myfile.go: loadParseTypecheck: no metadata found for /my/path/myfile.go
2019/07/11 15:28:58 Error:unable to check package for file:///my/path/myfile.go: loadParseTypecheck: no metadata found for /my/path/myfile.go
/my/path/myfile.go: file:///my/path/myfile.go is not part of a package
@malexdev
Copy link

@malexdev malexdev commented Jul 11, 2019

I am also having this issue.

Sometimes restarting the language server will resolve the issue, but then it will come back seemingly at random. The only thing that seems to permanently resolve the issue for a newly created file is to reload VS Code.

This is using modules.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 11, 2019

@mthie, @jamiebarnett, @linguohua, @malexdev - could you share a full gopls log? It would be easier for me to understand the issue to see a log that starts from the beginning. Also, if you are using VSCode, please share your VSCode settings.

@mthie
Copy link

@mthie mthie commented Jul 11, 2019

Well, I thought, I already posted the full log ;)
Here's a verbose output:

$ gopls -v check myfile.go
2019/07/11 18:48:08 Info:Build info
----------
version v0.1.3-cmd.gopls, built in $GOPATH mode

Go info
-------
go version go1.12.6 linux/amd64

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mthie/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mthie/go"
GOPROXY=""
GORACE=""
GOROOT="/opt/go"
GOTMPDIR=""
GOTOOLDIR="/opt/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
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-build237434352=/tmp/go-build -gno-record-gcc-switches"
2019/07/11 18:48:08 Error:unable to check package for file:///home/mthie/go/src/github.com/mthie/mylib/myfile.go: loadParseTypecheck: no metadata found for /home/mthie/go/src/github.com/mthie/mylib/myfile.go
2019/07/11 18:48:08 Error:unable to check package for file:///home/mthie/go/src/github.com/mthie/mylib/myfile.go: loadParseTypecheck: no metadata found for /home/mthie/go/src/github.com/mthie/mylib/myfile.go
/home/mthie/go/src/github.com/mthie/mylib/myfile.go: file:///home/mthie/go/src/github.com/mthie/mylib/myfile.go is not part of a package
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 11, 2019

Thanks for sharing all of it, I didn't realize you were using gopls on the command line. What happens when you run go list -e -json -compiled -test /home/mthie/go/src/github.com/mthie/mylib?

@malexdev
Copy link

@malexdev malexdev commented Jul 11, 2019

@stamblerre

I created a test project in my Downloads folder (running on Windows).
File operations were in the following order:

  1. Create Downloads/test folder and open VS Code to that folder.
  2. Create main.go.
  3. Run go mod init test in VS Code terminal.
  4. Write content of main.go as specified below and save.
  5. Create folder sub and file sub.go.
  6. Write content of sub/sub.go as specified below and save.
  7. Observe error.

Project tree:

Downloads/test
--main.go
--go.mod
--sub/
----sub.go

Contents of main.go:

package main

func main() {
	
}

Contents of go.mod:

module test

go 1.12

Contents of sub/sub.go:

package sub

Contents of gopls log:

[Info  - 1:40:56 PM] Build info
----------
version v0.1.1, built in $GOPATH mode

Go info
-------
go version go1.12.1 windows/amd64

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\martinal\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\martinal\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=c:\Users\martinal\Downloads\test\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\martinal\AppData\Local\Temp\go-build284579710=/tmp/go-build -gno-record-gcc-switches

[Error - 1:40:56 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:56 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:56 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:56 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/main.go
  Code: 0 
[Error - 1:40:56 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:57 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:57 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:57 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/main.go
  Code: 0 
[Error - 1:40:57 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:57 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:57 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:58 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:58 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/main.go
  Code: 0 
[Error - 1:40:58 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:58 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Info  - 1:40:58 PM] no completions found for file:///c:/Users/martinal/Downloads/test/main.go:0:1: no AST for file:///c:/Users/martinal/Downloads/test/main.go
[Error - 1:40:58 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:58 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:59 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:59 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:59 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:59 PM] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/martinal/Downloads/test/main.go
  Code: 0 
[Error - 1:40:59 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:59 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:40:59 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:00 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:00 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:00 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/main.go
  Code: 0 
[Error - 1:41:00 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:00 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:00 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:01 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Info  - 1:41:01 PM] no completions found for file:///c:/Users/martinal/Downloads/test/main.go:0:1: no AST for file:///c:/Users/martinal/Downloads/test/main.go
[Error - 1:41:01 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:01 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:01 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/main.go
  Code: 0 
[Error - 1:41:01 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:01 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:01 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:03 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:03 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:03 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Error - 1:41:03 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/main.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\main.go
[Info  - 1:41:05 PM] no completions found for file:///c:/Users/martinal/Downloads/test/main.go:0:10: this is a definition
[Error - 1:41:07 PM] Request textDocument/codeAction failed.
  Message: c:\Users\martinal\Downloads\test\main.go:3:10: expected '(', found newline (and 3 more errors)
  Code: 0 
[Info  - 1:41:08 PM] no signature help for file:///c:/Users/martinal/Downloads/test/main.go:2:12 : cannot find an enclosing function
[Info  - 1:41:08 PM] no signature help for file:///c:/Users/martinal/Downloads/test/main.go:2:13 : cannot find an enclosing function
[Info  - 1:41:08 PM] no signature help for file:///c:/Users/martinal/Downloads/test/main.go:3:1 : cannot find an enclosing function
[Error - 1:41:20 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:20 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:20 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:41:20 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:20 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:21 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:21 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:21 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:41:21 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:21 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:21 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:22 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:22 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:22 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Info  - 1:41:22 PM] no completions found for file:///c:/Users/martinal/Downloads/test/sub/sub.go:0:2: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
[Error - 1:41:22 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:22 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:23 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:23 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:23 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:23 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:23 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 1:41:23 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:24 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:24 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:24 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:24 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:24 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:24 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:41:24 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:24 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:24 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Info  - 1:41:25 PM] no completions found for file:///c:/Users/martinal/Downloads/test/sub/sub.go:0:11: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:41:25 PM] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:42:06 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:42:06 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:42:06 PM] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:43:49 PM] file:///c:/Users/martinal/Downloads/test/go.mod is not a Go file
[Error - 1:43:49 PM] Request textDocument/documentLink failed.
  Message: not a Go file file:///c:/Users/martinal/Downloads/test/go.mod
  Code: 0 
[Error - 1:43:49 PM] Request textDocument/codeAction failed.
  Message: not a Go file file:///c:/Users/martinal/Downloads/test/go.mod
  Code: 0 
[Error - 1:43:49 PM] Request textDocument/documentSymbol failed.
  Message: not a Go file file:///c:/Users/martinal/Downloads/test/go.mod
  Code: 0 
[Error - 1:43:50 PM] Request textDocument/codeAction failed.
  Message: not a Go file file:///c:/Users/martinal/Downloads/test/go.mod
  Code: 0 
[Error - 1:44:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:44:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:44:02 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:44:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:44:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:44:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:44:02 PM] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 1:44:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:44:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:44:02 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 1:44:02 PM] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 

From this project and others it appears that the issue is when this line appears:

[Error - 1:44:02 PM] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 

Edit: The Go relevant values of my VS Code settings are as follows:

"go.lintFlags": [],
    "go.addTags": {
      "tags": "json",
      "options": "",
      "promptForTags": true,
      "transform": "snakecase"
    },
    "go.buildTags": "debug",
    "go.coverageOptions": "showBothCoveredAndUncoveredCode",
    "go.autocompleteUnimportedPackages": false,
    "go.useCodeSnippetsOnFunctionSuggest": true,
    "go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
    "go.useLanguageServer": true,
    "[go]": {
      "editor.snippetSuggestions": "none",
      "editor.formatOnSave": true,
      "editor.codeActionsOnSave": {
        "source.organizeImports": true
      }
    },
    "gopls": {
      "usePlaceholders": true // add parameter placeholders when completing a function
    },
    "files.eol": "\n",

The error doesn't always appear when creating new files; I have had some success replicating this by having another dirty file in the package with syntax errors at the time I create the new file. But then, sometimes (as in this case), no such hacks are required. So I'm wondering if this is possibly that something inside gopls gets hung up on the syntax errors in a dirty file and something gets corrupted...

Please let me know if there is any more assistance I can provide! I hope this was helpful.

@muirdm
Copy link

@muirdm muirdm commented Jul 11, 2019

@jadekler Does it work if you initialize a go.mod file first in the directory?

@muirdm
Copy link

@muirdm muirdm commented Jul 11, 2019

@malexdev your issue seems to be different. I think it should be fixed by https://go-review.googlesource.com/c/tools/+/185839 if you want to try out that patch.

@ravayak
Copy link

@ravayak ravayak commented Jul 12, 2019

same problem, here.

gopls version
version v0.1.3-cmd.gopls, built in $GOPATH mode

I'm using visual studio 1.36.1 on windows 10 pro x64
go settings are default ones except go.useLanguageServer to false (while this issue is resolved)

Tree of the project :

Tree of the project

content of go.mod :

module github.com/ravayak/snippetbox

go 1.12

require (
	github.com/go-sql-driver/mysql v1.4.1
	github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c // indirect
	github.com/kisielk/gotool v1.0.0 // indirect
	github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86 // indirect
	github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab // indirect
	github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
	github.com/spf13/cobra v0.0.5 // indirect
	golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect
	golang.org/x/tools v0.0.0-20190710153321-831012c29e42 // indirect)

gopls output

Info  - 12:16:32] Build info
----------
version v0.1.3-cmd.gopls, built in $GOPATH mode

Go info
-------
go version go1.12.5 windows/amd64

set GOARCH=amd64
set GOBIN=C:\Users\antonny\go\bin
set GOCACHE=C:\Users\antonny\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\antonny\go
set GOPROXY=
set GORACE=
set GOROOT=c:\go
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
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=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\antonny\AppData\Local\Temp\go-build164306538=/tmp/go-build -gno-record-gcc-switches

[Error - 12:16:33] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] Request textDocument/documentSymbol failed.
  Message: no AST for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] Request textDocument/documentSymbol failed.
  Message: no AST for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] Request textDocument/codeAction failed.
  Message: no file information for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] Request textDocument/codeAction failed.
  Message: no file information for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] Request textDocument/codeAction failed.
  Message: no file information for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] Request textDocument/documentSymbol failed.
  Message: no AST for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 12:16:34] Request textDocument/codeAction failed.
  Message: no file information for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] Request textDocument/codeAction failed.
  Message: no file information for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] no highlight for C:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go:14:43: no AST for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] Request textDocument/codeAction failed.
  Message: no file information for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
[Error - 12:16:34] Request textDocument/codeAction failed.
  Message: no file information for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/mysql/snippets.go
  Code: 0 
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] unable to check package for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: no packages found for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
[Error - 12:16:34] Request textDocument/codeAction failed.
  Message: no file information for file:///C:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
@linguohua
Copy link

@linguohua linguohua commented Jul 12, 2019

@stamblerre @muirrn Thank you. I try the latest commit tody, update to commit ID:9a621aea19f8341c01da59e0d42dd97700f677d0, and test the same project on windows and linux, 'the not part of a package' problem seems to be fixed.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 12, 2019

@malexdev: Because you're getting the error in go/packages.Load, it makes me think you have a go list error. What happens if you add

"go.toolsEnvVars": {
    "GO111MODULE": "on",
},

to your settings? What is the output of go list -e -json -compiled -test /c:/Users/martinal/Downloads/test?

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 12, 2019

Also, can you update to the latest version of gopls (go get golang.org/x/tools/gopls@latest)?

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 12, 2019

@ravayak: In your log, it looks like gopls is printing an environment with an empty GOMOD. Can you also add

"go.toolsEnvVars": {
    "GO111MODULE": "on",
}

to your VSCode settings?

@malexdev
Copy link

@malexdev malexdev commented Jul 12, 2019

@stamblerre: I apologize, I didn't realize that the @latest mattered. I have updated gopls using go get golang.org/x/tools/gopls@latest.

I added the settings specified below to my test project:

"go.toolsEnvVars": {
    "GO111MODULE": "on",
},

I then removed my sub folder, reloaded VS Code, and then re-added the sub folder and sub/sub.go file. After typing package sub into sub/sub.go and saving, the error is still appearing.

New gopls output:

[Info  - 2:09:32 PM] Build info
----------
golang.org/x/tools/gopls v0.1.3
    golang.org/x/tools/gopls@v0.1.3 h1:CB5ECiPysqZrwxcyRjN+exyZpY0gODTZvNiqQi3lpeo=
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
    golang.org/x/tools@v0.0.0-20190710184609-286818132824 h1:dOGf5KG5e5tnConXcTAnHv2YgmYJtrYjN9b1cMC21TY=

Go info
-------
go version go1.12.1 windows/amd64

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\martinal\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\martinal\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=c:\Users\martinal\Downloads\test\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\martinal\AppData\Local\Temp\go-build678401514=/tmp/go-build -gno-record-gcc-switches

[Error - 2:09:33 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:33 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:33 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:33 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:33 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:34 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:34 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 2:09:34 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:34 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:34 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:34 PM] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 2:09:34 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:35 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:35 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 2:09:35 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 2:09:35 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Info  - 2:09:35 PM] no completions found for file:///c:/Users/martinal/Downloads/test/sub/sub.go:0:1: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
[Error - 2:09:35 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:35 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:35 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:36 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:36 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:36 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:36 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:36 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:36 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:37 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:37 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:37 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:37 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:37 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:38 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 2:09:39 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:39 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 2:09:39 PM] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 

The output of go list -e -json -compiled -test /c:/Users/martinal/Downloads/test is go: directory . outside available modules.

I also ran go list -e -json -compiled -test ., and received the following output:

{
        "Dir": "C:\\Users\\martinal\\Downloads\\test",
        "ImportPath": "test",
        "Name": "main",
        "Target": "C:\\Users\\martinal\\go\\bin\\test.exe",
        "Module": {
                "Path": "test",
                "Main": true,
                "Dir": "C:\\Users\\martinal\\Downloads\\test",
                "GoMod": "C:\\Users\\martinal\\Downloads\\test\\go.mod",
                "GoVersion": "1.12"
        },
        "Match": [
                "."
        ],
        "Stale": true,
        "StaleReason": "build ID mismatch",
        "GoFiles": [
                "main.go"
        ],
        "CompiledGoFiles": [
                "main.go"
        ],
        "Deps": [
                "internal/bytealg",
                "internal/cpu",
                "runtime",
                "runtime/internal/atomic",
                "runtime/internal/math",
                "runtime/internal/sys",
                "unsafe"
        ]
}
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 12, 2019

Can you try the following:

~ $ go get golang.org/x/tools/go/packages/gopackages
~ $ gopackages -mode=imports /c:/Users/martinal/Downloads/test/sub/sub.go`

What directory are you opening VSCode with?

@malexdev
Copy link

@malexdev malexdev commented Jul 12, 2019

Can you try the following:

~ $ go get golang.org/x/tools/go/packages/gopackages
~ $ gopackages -mode=imports /c:/Users/martinal/Downloads/test/sub/sub.go`

Received output:

$ gopackages -mode=imports /c:/Users/martinal/Downloads/test/sub/sub.go
Go package "command-line-arguments":
        package sub
        has no exported type info
        file c:\Users\martinal\Downloads\test\sub\sub.go

What directory are you opening VSCode with?

I am navigating to the folder (C:\Users\martinal\Downloads\test) in Windows Explorer, then right-clicking inside the folder and selecting "Open with Code", if that's what you're asking.

Additionally, this may be a related issue: I'm also having some instances where functions in other files of a package fail to be recognized. If it's related and helps shed light on what's going on great, if not I will not worry about this other issue for right now - I don't want to complicate matters.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 12, 2019

That actually sounds a lot like #33018. Can you try the same command but with the -json flag as well?

@malexdev
Copy link

@malexdev malexdev commented Jul 12, 2019

That actually sounds a lot like #33018. Can you try the same command but with the -json flag as well?

$ gopackages -json -mode=imports /c:/Users/martinal/Downloads/test/sub/sub.go
{
        "ID": "command-line-arguments",
        "Name": "sub",
        "PkgPath": "command-line-arguments",
        "GoFiles": [
                "c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"
        ],
        "CompiledGoFiles": [
                "c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"
        ]
}

Also, I assume the command-line-arguments stuff is related to gopackages, but just in case - I don't have a string like that anywhere in my test project.

Edit: Earlier I mentioned "some instances" of that other error - turns out it's actually every instance where a symbol is referenced from another file in the same package. They all say undeclared name: foo even when I have the file they're declared in open and visible with foo clearly declared and in the same package.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 12, 2019

Yeah, that is a go/packages thing. Are you using build tags? Would you be willing to share the output of

~ $ tree c:/Users/martinal/Downloads/test

Would you be willing to share the contents of /c:/Users/martinal/Downloads/test/sub/sub.go?

@malexdev
Copy link

@malexdev malexdev commented Jul 12, 2019

I am not using build tags.

Output of tree (I had to use tree.com, since Windows):

$ tree.com /c:/users/martinal/downloads/test
Folder PATH listing for volume OS Disk
Volume serial number is D41D-3E93
C:\USERS\MARTINAL\DOWNLOADS\TEST
├───.vscode
└───sub

Content of /c:/Users/martinal/Downloads/test/sub/sub.go:

package sub

// Test is a function that tests things
func Test() {
	// Do nothing
}

Zipped project:
test.zip

And to clarify:

  • This test project demonstrates the issue file:///c:/Users/martinal/Downloads/test/sub/sub.go is not part of a package, but in order to trigger the issue after opening the project I usually need to remove sub and then recreate sub/sub.go, since reloading the VS Code window temporarily fixes the issue.
  • I can't seem to duplicate the other issue (undeclared name: foo) in this test project. I'm not sure why. It is showing up in my main project that I'm actually trying to work on, but not this one. I wonder if it's an issue that only shows up on larger / more complex projects.
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 12, 2019

Oh, that's so strange. Can you add -rpc.trace to your go.languageServerFlags setting in VSCode and share another log? I didn't realize that it sometimes worked, I thought it was just always failing.

@malexdev
Copy link

@malexdev malexdev commented Jul 12, 2019

Yes, I'm really scratching my head over here too. Thanks for your patience and help!

I performed the following steps:

  1. Open the test project (via right click, Open in VS Code).
  2. Delete sub/.
  3. Update settings to enable -rpc.trace in go.languageServerFlags.
  4. Reload VS Code window.
  5. Create folder sub and file sub/sub.go.
  6. Write package sub\n\n in sub/sub.go, then save the file.
  7. Error was duplicated.

Trace enabled log:

[Trace - 4:26:16 PM] Sending request 'initialize - (0)'.
Params: {"processId":7300,"rootPath":"c:\\Users\\martinal\\Downloads\\test","rootUri":"file:///c%3A/Users/martinal/Downloads/test","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"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},"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},"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"]}},"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]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":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},"documentLink":{"dynamicRegistration":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true}}},"initializationOptions":{"funcSnippetEnabled":true,"gocodeCompletionEnabled":true},"trace":"off","workspaceFolders":[{"uri":"file:///c%3A/Users/martinal/Downloads/test","name":"test"}]}


[Trace - 4:26:16 PM] Received response 'initialize - (0)' in 90ms.
Params: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"hoverProvider":true,"completionProvider":{"triggerCharacters":["."]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"documentFormattingProvider":true,"renameProvider":true,"documentLinkProvider":{},"typeDefinitionProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"custom":null}


[Trace - 4:26:16 PM] Sending notification 'initialized'.
Params: {}


[Trace - 4:26:16 PM] Received request 'client/registerCapability - (1)'.
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"}]}


[Trace - 4:26:16 PM] Sending response 'client/registerCapability - (1)' in 1ms.
Params: {}


[Trace - 4:26:16 PM] Received request 'workspace/configuration - (2)'.
Params: {"items":[{"scopeUri":"file:///c:/Users/martinal/Downloads/test","section":"gopls"}]}


[Trace - 4:26:16 PM] Sending response 'workspace/configuration - (2)' in 3ms.
Params: [{"usePlaceholders":true}]


[Trace - 4:26:16 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"Build info\n----------\ngolang.org/x/tools/gopls v0.1.3\n    golang.org/x/tools/gopls@v0.1.3 h1:CB5ECiPysqZrwxcyRjN+exyZpY0gODTZvNiqQi3lpeo=\n    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=\n    golang.org/x/tools@v0.0.0-20190710184609-286818132824 h1:dOGf5KG5e5tnConXcTAnHv2YgmYJtrYjN9b1cMC21TY=\n\nGo info\n-------\ngo version go1.12.1 windows/amd64\n\nset GOARCH=amd64\nset GOBIN=\nset GOCACHE=C:\\Users\\martinal\\AppData\\Local\\go-build\nset GOEXE=.exe\nset GOFLAGS=\nset GOHOSTARCH=amd64\nset GOHOSTOS=windows\nset GOOS=windows\nset GOPATH=C:\\Users\\martinal\\go\nset GOPROXY=\nset GORACE=\nset GOROOT=C:\\Go\nset GOTMPDIR=\nset GOTOOLDIR=C:\\Go\\pkg\\tool\\windows_amd64\nset GCCGO=gccgo\nset CC=gcc\nset CXX=g++\nset CGO_ENABLED=1\nset GOMOD=c:\\Users\\martinal\\Downloads\\test\\go.mod\nset CGO_CFLAGS=-g -O2\nset CGO_CPPFLAGS=\nset CGO_CXXFLAGS=-g -O2\nset CGO_FFLAGS=-g -O2\nset CGO_LDFLAGS=-g -O2\nset PKG_CONFIG=pkg-config\nset GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\\Users\\martinal\\AppData\\Local\\Temp\\go-build098704730=/tmp/go-build -gno-record-gcc-switches\n"}


[Trace - 4:26:16 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/main.go","languageId":"go","version":1,"text":"package main\n\nfunc main() {\n\t\n}"}}


[Info  - 4:26:16 PM] Build info
----------
golang.org/x/tools/gopls v0.1.3
    golang.org/x/tools/gopls@v0.1.3 h1:CB5ECiPysqZrwxcyRjN+exyZpY0gODTZvNiqQi3lpeo=
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
    golang.org/x/tools@v0.0.0-20190710184609-286818132824 h1:dOGf5KG5e5tnConXcTAnHv2YgmYJtrYjN9b1cMC21TY=

Go info
-------
go version go1.12.1 windows/amd64

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\martinal\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\martinal\go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=c:\Users\martinal\Downloads\test\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\martinal\AppData\Local\Temp\go-build098704730=/tmp/go-build -gno-record-gcc-switches

[Trace - 4:26:16 PM] Sending request 'textDocument/documentSymbol - (1)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/main.go"}}


[Trace - 4:26:16 PM] Sending request 'textDocument/codeAction - (2)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/main.go"},"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":1}},"context":{"diagnostics":[]}}


[Trace - 4:26:16 PM] Received response 'textDocument/documentSymbol - (1)' in 533ms.
Params: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":2,"character":0},"end":{"line":4,"character":1}},"selectionRange":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}}}]


[Trace - 4:26:16 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///c:/Users/martinal/Downloads/test/main.go","diagnostics":[]}


[Trace - 4:26:16 PM] Sending request 'textDocument/documentLink - (3)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/main.go"}}


[Trace - 4:26:16 PM] Received response 'textDocument/documentLink - (3)' in 533ms.
Params: {}


[Trace - 4:26:16 PM] Received response 'textDocument/codeAction - (2)' in 533ms.
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///c:/Users/martinal/Downloads/test/main.go":[{"range":{"start":{"line":3,"character":0},"end":{"line":4,"character":0}},"newText":""},{"range":{"start":{"line":4,"character":0},"end":{"line":5,"character":0}},"newText":""},{"range":{"start":{"line":5,"character":0},"end":{"line":5,"character":0}},"newText":"\n"},{"range":{"start":{"line":5,"character":0},"end":{"line":5,"character":0}},"newText":"}\n"}]}}}]


[Trace - 4:26:25 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","languageId":"go","version":1,"text":""}}


[Trace - 4:26:25 PM] Sending request 'textDocument/documentLink - (4)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go"}}


[Trace - 4:26:25 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:25 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:25 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:26 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:26 PM] send textDocument/documentLink#4 no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go


[Trace - 4:26:26 PM] Sending request 'textDocument/documentSymbol - (5)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go"}}


[Error - 4:26:26 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 4:26:26 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Trace - 4:26:26 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:26 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:26 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:26 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:26 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:26 PM] send textDocument/documentSymbol#5 no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go


[Error - 4:26:26 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Error - 4:26:26 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Trace - 4:26:27 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":2},"contentChanges":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"rangeLength":0,"text":"p"}]}


[Trace - 4:26:27 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":3},"contentChanges":[{"range":{"start":{"line":0,"character":1},"end":{"line":0,"character":1}},"rangeLength":0,"text":"a"}]}


[Trace - 4:26:27 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Trace - 4:26:27 PM] Sending request 'textDocument/completion - (6)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go"},"position":{"line":0,"character":2},"context":{"triggerKind":1}}


[Trace - 4:26:27 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: context canceled"}


[Error - 4:26:27 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:27 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:27 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:28 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:28 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:28 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:28 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:28 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Trace - 4:26:28 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"no completions found for file:///c:/Users/martinal/Downloads/test/sub/sub.go:0:2: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go"}


[Trace - 4:26:28 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":4},"contentChanges":[{"range":{"start":{"line":0,"character":2},"end":{"line":0,"character":2}},"rangeLength":0,"text":"c"}]}


[Trace - 4:26:28 PM] Received response 'textDocument/completion - (6)' in 919ms.
Params: {"isIncomplete":false,"items":[]}


[Trace - 4:26:28 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":5},"contentChanges":[{"range":{"start":{"line":0,"character":3},"end":{"line":0,"character":3}},"rangeLength":0,"text":"k"}]}


[Error - 4:26:28 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Info  - 4:26:28 PM] no completions found for file:///c:/Users/martinal/Downloads/test/sub/sub.go:0:2: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
[Trace - 4:26:28 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:28 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:28 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Trace - 4:26:28 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":6},"contentChanges":[{"range":{"start":{"line":0,"character":4},"end":{"line":0,"character":4}},"rangeLength":0,"text":"a"}]}


[Error - 4:26:28 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:29 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:29 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:29 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Trace - 4:26:29 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":7},"contentChanges":[{"range":{"start":{"line":0,"character":5},"end":{"line":0,"character":5}},"rangeLength":0,"text":"g"}]}


[Error - 4:26:29 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:29 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Trace - 4:26:29 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":8},"contentChanges":[{"range":{"start":{"line":0,"character":6},"end":{"line":0,"character":6}},"rangeLength":0,"text":"e"}]}


[Trace - 4:26:29 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: context canceled"}


[Error - 4:26:29 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:29 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:29 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:30 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Trace - 4:26:30 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":9},"contentChanges":[{"range":{"start":{"line":0,"character":7},"end":{"line":0,"character":7}},"rangeLength":0,"text":" "}]}


[Error - 4:26:30 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:30 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Error - 4:26:30 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:30 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\\Users\\martinal\\Downloads\\test\\sub\\sub.go"}


[Trace - 4:26:30 PM] Sending request 'textDocument/documentSymbol - (7)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go"}}


[Error - 4:26:30 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: go/packages.Load: no packages found for c:\Users\martinal\Downloads\test\sub\sub.go
[Trace - 4:26:30 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:30 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Trace - 4:26:30 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:30 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///c:/Users/martinal/Downloads/test/sub/sub.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"severity":1,"source":"LSP","message":"file:///c:/Users/martinal/Downloads/test/sub/sub.go is not part of a package"}]}


[Error - 4:26:30 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Trace - 4:26:30 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:30 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Trace - 4:26:31 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:31 PM] send textDocument/documentSymbol#7 no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go


[Trace - 4:26:31 PM] Sending request 'textDocument/documentLink - (8)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go"}}


[Error - 4:26:31 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:31 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Trace - 4:26:31 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:31 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Trace - 4:26:31 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:31 PM] send textDocument/documentLink#8 no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go


[Trace - 4:26:31 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":10},"contentChanges":[{"range":{"start":{"line":0,"character":8},"end":{"line":0,"character":8}},"rangeLength":0,"text":"s"}]}


[Trace - 4:26:31 PM] Sending request 'textDocument/completion - (9)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go"},"position":{"line":0,"character":9},"context":{"triggerKind":1}}


[Error - 4:26:31 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:31 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Trace - 4:26:31 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:31 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Trace - 4:26:31 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:31 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///c:/Users/martinal/Downloads/test/sub/sub.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"severity":1,"source":"LSP","message":"file:///c:/Users/martinal/Downloads/test/sub/sub.go is not part of a package"}]}


[Error - 4:26:31 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"no completions found for file:///c:/Users/martinal/Downloads/test/sub/sub.go:0:9: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go"}


[Trace - 4:26:32 PM] Received response 'textDocument/completion - (9)' in 3424ms.
Params: {"isIncomplete":false,"items":[]}


[Trace - 4:26:32 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":11},"contentChanges":[{"range":{"start":{"line":0,"character":9},"end":{"line":0,"character":9}},"rangeLength":0,"text":"u"}]}


[Trace - 4:26:32 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":12},"contentChanges":[{"range":{"start":{"line":0,"character":10},"end":{"line":0,"character":10}},"rangeLength":0,"text":"b"}]}


[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Info  - 4:26:32 PM] no completions found for file:///c:/Users/martinal/Downloads/test/sub/sub.go:0:9: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///c:/Users/martinal/Downloads/test/sub/sub.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"severity":1,"source":"LSP","message":"file:///c:/Users/martinal/Downloads/test/sub/sub.go is not part of a package"}]}


[Trace - 4:26:32 PM] Sending request 'textDocument/codeAction - (10)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go"},"range":{"start":{"line":0,"character":11},"end":{"line":0,"character":11}},"context":{"diagnostics":[]}}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///c:/Users/martinal/Downloads/test/sub/sub.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"severity":1,"source":"LSP","message":"file:///c:/Users/martinal/Downloads/test/sub/sub.go is not part of a package"}]}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:32 PM] send textDocument/codeAction#10 no file information for file:///c:/Users/martinal/Downloads/test/sub/sub.go


[Trace - 4:26:32 PM] Sending request 'textDocument/documentSymbol - (11)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go"}}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:32 PM] send textDocument/documentSymbol#11 no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go


[Trace - 4:26:32 PM] Sending notification '$/cancelRequest'.
Params: {"id":7}


[Trace - 4:26:32 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":13},"contentChanges":[{"range":{"start":{"line":0,"character":11},"end":{"line":0,"character":11}},"rangeLength":0,"text":"\n"}]}


[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Trace - 4:26:32 PM] Sending notification '$/cancelRequest'.
Params: {"id":10}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Sending notification '$/cancelRequest'.
Params: {"id":9}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///c:/Users/martinal/Downloads/test/sub/sub.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"severity":1,"source":"LSP","message":"file:///c:/Users/martinal/Downloads/test/sub/sub.go is not part of a package"}]}


[Trace - 4:26:32 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":14},"contentChanges":[{"range":{"start":{"line":1,"character":0},"end":{"line":1,"character":0}},"rangeLength":0,"text":"\n"}]}


[Trace - 4:26:32 PM] Sending request 'textDocument/codeAction - (12)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go"},"range":{"start":{"line":0,"character":0},"end":{"line":2,"character":0}},"context":{"diagnostics":[]}}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///c:/Users/martinal/Downloads/test/sub/sub.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"severity":1,"source":"LSP","message":"file:///c:/Users/martinal/Downloads/test/sub/sub.go is not part of a package"}]}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:32 PM] send textDocument/codeAction#12 no package for file file:///c:/Users/martinal/Downloads/test/sub/sub.go


[Trace - 4:26:32 PM] Sending request 'textDocument/documentLink - (13)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go"}}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Error - 4:26:32 PM] send textDocument/documentLink#13 no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go


[Trace - 4:26:32 PM] Sending request 'textDocument/documentSymbol - (14)'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go"}}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position"}


[Trace - 4:26:32 PM] Sending notification '$/cancelRequest'.
Params: {"id":11}


[Error - 4:26:32 PM] send textDocument/documentSymbol#14 no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go


[Trace - 4:26:32 PM] Sending notification '$/cancelRequest'.
Params: {"id":12}


[Trace - 4:26:32 PM] Sending notification 'textDocument/didSave'.
Params: {"textDocument":{"uri":"file:///c%3A/Users/martinal/Downloads/test/sub/sub.go","version":14}}


[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] unable to check package for file:///c:/Users/martinal/Downloads/test/sub/sub.go: failed to cache file file:///c:/Users/martinal/Downloads/test/sub/sub.go: AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go has an invalid position
[Error - 4:26:32 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/martinal/Downloads/test/sub/sub.go
  Code: 0 
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 12, 2019

What happens if you reload the VSCode window without deleting the directories?

@malexdev
Copy link

@malexdev malexdev commented Jul 12, 2019

Reloading the window without removing the directories resolves the issue until another directory is added.

@linguohua
Copy link

@linguohua linguohua commented Jul 13, 2019

With the latest gopls build,
I think I can reproduce the bug, just go to any go file, type anything at the begining, just before the 'package xxxxxx' line, the the bug will bubble up.

another thing is, when there are some files opened in vscode, then type restart language server in the vscode's command popup to restart gopls, then some file will got the 'not part of package' error. But if only one file opened, or no file opened, then everything is ok.

image

as malexdev log output, the problem relative to the log string: 'has an invalid position'.

[Error - 上午7:49:07] no highlight for d:\newserver\rconst\account_table.go: d:\newserver\rconst\account_table.go:1:1 is not an identifier
[Error - 上午7:49:12] unable to check package for file:///d:/newserver/rconst/account_table.go: failed to cache file file:///d:/newserver/rconst/account_table.go: AST for file:///d:/newserver/rconst/account_table.go has an invalid position
[Error - 上午7:49:12] unable to check package for file:///d:/newserver/rconst/account_table.go: failed to cache file file:///d:/newserver/rconst/account_table.go: AST for file:///d:/newserver/rconst/account_table.go has an invalid position
[Error - 上午7:49:12] unable to check package for file:///d:/newserver/rconst/account_table.go: failed to cache file file:///d:/newserver/rconst/account_table.go: AST for file:///d:/newserver/rconst/account_table.go has an invalid position
[Error - 上午7:49:12] unable to check package for file:///d:/newserver/rconst/account_table.go: failed to cache file file:///d:/newserver/rconst/account_table.go: AST for file:///d:/newserver/rconst/account_table.go has an invalid position

I think, if there are error occur when try to parse a go file, then next vscode request, gopls should discard anything of this file, and reload the file to parse again.

@ravayak
Copy link

@ravayak ravayak commented Jul 13, 2019

@stamblerre I tryed the latest commit and added

"go.toolsEnvVars": {
    "GO111MODULE": "on",
}

and still got errors :

[Info  - 16:42:54] Build info
----------
version v0.1.3-cmd.gopls, built in $GOPATH mode

Go info
-------
go version go1.12.5 windows/amd64

set GOARCH=amd64
set GOBIN=C:\Users\antonny\go\bin
set GOCACHE=C:\Users\antonny\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\antonny\go
set GOPROXY=
set GORACE=
set GOROOT=c:\go
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\antonny\AppData\Local\Temp\go-build117442422=/tmp/go-build -gno-record-gcc-switches

[Error - 16:42:57] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:42:59] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:02] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:02] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go
  Code: 0 
[Error - 16:43:04] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:06] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:08] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:08] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go
  Code: 0 
[Error - 16:43:10] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:12] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:14] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:14] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go
  Code: 0 
[Error - 16:43:16] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:18] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:20] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:22] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:22] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:43:24] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:28] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:28] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:43:30] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:32] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:32] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:43:34] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:36] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:36] no highlight for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go:17:32: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
[Error - 16:43:38] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:40] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:42] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:42] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:43:44] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:43:46] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:48] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:48] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go
  Code: 0 
[Error - 16:43:50] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:52] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:54] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:54] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go
  Code: 0 
[Error - 16:43:56] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:43:59] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:44:01] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:44:03] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:44:05] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:44:05] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go
  Code: 0 
[Error - 16:44:07] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:44:09] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:44:11] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:44:11] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go
  Code: 0 
[Error - 16:44:13] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:44:15] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:44:15] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go
  Code: 0 
[Error - 16:44:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/handlers.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\handlers.go
[Error - 16:44:19] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:44:21] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:44:24] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:44:26] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:44:26] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 16:44:28] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:44:30] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:44:32] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:44:32] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 16:44:34] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:44:36] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:44:36] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 16:44:38] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:44:41] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:44:43] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:44:45] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:44:47] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:44:47] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:44:49] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:44:51] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:44:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:44:53] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:44:55] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:44:57] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:44:57] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:44:59] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:02] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:05] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:05] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:45:06] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:08] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:45:10] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:45:12] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:45:14] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:45:14] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 16:45:16] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:45:18] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:45:20] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:45:20] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 16:45:23] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:45:25] Request textDocument/documentSymbol failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:45:25] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:45:25] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:45:25] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:45:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:45:25] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:45:27] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:29] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:29] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:45:31] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:33] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:34] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:34] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:45:37] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:39] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:41] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:41] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:45:43] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:45] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:47] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:47] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:45:49] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:51] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:45:53] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:45:53] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
  Code: 0 
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:45:53] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
  Code: 0 
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:53] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:53] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:53] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:53] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:45:53] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 16:45:55] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:45:57] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:45:57] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 16:45:59] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:46:02] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:46:04] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:46:04] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 16:46:07] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:46:09] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:46:11] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:46:11] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 16:46:13] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:46:15] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\main.go
[Error - 16:46:17] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/main.go
  Code: 0 
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:46:17] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
  Code: 0 
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:46:17] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
  Code: 0 
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:46:17] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:46:17] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:46:17] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:46:17] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
[Error - 16:46:17] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/pkg/models/models.go
  Code: 0 
[Error - 16:46:19] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:21] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:21] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:46:23] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:25] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:27] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:27] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:46:29] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:31] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:33] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:33] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:46:34] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:36] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:38] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:38] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:46:40] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:42] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:44] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:44] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:46:46] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:48] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:48] no highlight for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go:24:73: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
[Error - 16:46:50] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:52] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:54] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:54] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:46:55] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:46:57] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go: go/packages.Load: no packages found for c:\Users\antonny\go\src\github.com\ravayak\snippetbox\cmd\web\templates.go
[Error - 16:47:00] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/templates.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:47:00] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
[Error - 16:47:00] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/middleware.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/documentLink failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/codeAction failed.
  Message: no package for file file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:47:00] Request textDocument/codeAction failed.
  Message: no file information for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:50:42] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:50:42] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:50:42] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:50:42] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:50:42] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:50:42] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
[Error - 16:50:43] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:50:43] unable to check package for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go: no packages found for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
[Error - 16:50:43] Request textDocument/hover failed.
  Message: no AST for file:///c:/Users/antonny/go/src/github.com/ravayak/snippetbox/cmd/web/routes.go
  Code: 0 
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 18, 2019

@ravayak: Looks like your GOMOD is set to NUL, as you can see in the gopls settings. This seems to be the error - how are you opening your editor? You have to open the directory that contains the go.mod file (see #32394).

@ravayak
Copy link

@ravayak ravayak commented Jul 22, 2019

@stamblerre Ok, i've just moved my project to another directory (it was in GOPATH/src originally) and then have updated my imports. It seems to solve the issue. My GOMOD is no longer set to NULL.

i didn't know that module support is enabled only when the current directory is outside
GOPATH/src
... I suppose that was the source of the problem with GOPLS.

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 22, 2019

If you have GO111MODULE=auto then yes, it will have to be outside of your $GOPATH. Is gopls working for you now?

@ravayak
Copy link

@ravayak ravayak commented Jul 23, 2019

@stamblerre Yes, it is

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 23, 2019

Glad to hear it. I'm going to close this issue for now. If anyone on this thread is still experiencing problems, please open a new issue, and I can help you debug.

@stamblerre stamblerre closed this Jul 23, 2019
@golang golang locked and limited conversation to collaborators Jul 22, 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
10 participants
You can’t perform that action at this time.