moovweb / gvm

Go Version Manager
http://github.com/moovweb/gvm
MIT License
9.91k stars 522 forks source link

Potential gvm integration problem with vscode? #341

Closed zhiqiangxu closed 4 years ago

zhiqiangxu commented 4 years ago

I installed go1.13 via:

gvm install go1.13 -B

I've installed 3 versions in total:

$ gvm list

gvm gos (installed)

   go1.10
   go1.12
=> go1.13

Then I changed the gopath and goroot in settings.json:


  "go.gopath": "/Users/xuzhiqiang/.gvm/pkgsets/go1.13/global",
  "go.goroot": "/Users/xuzhiqiang/.gvm/gos/go1.13",

image

The "run test" works, but "debug test" fails:

# runtime/internal/atomic
compile: version "go1.13" does not match go tool version "go1.12"
# github.com/google/go-cmp/cmp/internal/diff
compile: version "go1.13" does not match go tool version "go1.12"
# math/bits
compile: version "go1.13" does not match go tool version "go1.12"
# unicode/utf8
compile: version "go1.13" does not match go tool version "go1.12"

Not sure if it's a bug of gvm, or vscode?

thoroc commented 4 years ago

gvm use go1.13 --default should allow vscode to find the correct version installed with GVM.