navigator.lua icon indicating copy to clipboard operation
navigator.lua copied to clipboard

cannot find package "unsafe" with golang

Open bigduu opened this issue 4 years ago • 3 comments

setting

lua <<EOF
require'navigator'.setup({
debug = true
})
EOF

gh.log

[INFO  Thu Sep  2 00:22:39 2021] .../nvim/plugged/navigator.lua/lua/navigator/definition.lua:50: { {
    error = {
      code = 0,
      message = 'err: exit status 1: stderr: cannot find package "unsafe" in any of:\n\t/usr/local/Cellar/go/1.16.2/bin/src/unsafe (from $GOROOT)\n\t/Users/bigduu/Documents/git/goproject/src/unsafe (from $GOPATH)\n: packages.Load error',
      <metatable> = {
        __tostring = <function 1>
      }
    }
  } }

bigduu avatar Sep 01 '21 16:09 bigduu

golang version is 1.16.2 OS : macOS 11.4

bigduu avatar Sep 01 '21 16:09 bigduu

Sizeof() is an internal function and go std package does not include it's go code. I suspect it is a C function. Also checked behaviour in vs-code and default lspconfig. But show the same/similar error (depends on gopls version).

ray-x avatar Sep 01 '21 22:09 ray-x

my gopls version

golang.org/x/tools/gopls v0.7.1
    golang.org/x/tools/[email protected] h1:Mh3Z8Xcoq3Zy7ksSlwDV/nzQSbjFf06A+L+F8YHq55U=

bigduu avatar Sep 02 '21 15:09 bigduu