volgar1x / vim-gocode

A Go bundle for Vundle or Pathogen
238 stars 34 forks source link

Compiler support not working? #24

Open myitcv opened 10 years ago

myitcv commented 10 years ago

Using commit 76f1ece5b6950f64f56f3c5d70a3c33e4f1e25af of vim-gocode and:

$ gvm version
Go Version Manager v1.0.19 installed at /home/myitcv/.gvm
$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb 25 2014 10:54:46)
Included patches: 1-192
$ echo $GOROOT
/home/myitcv/.gvm/gos/go1.2
$ echo $GOPATH
/home/myitcv/gostuff:/home/myitcv/.gvm/pkgsets/go1.2/global

The simple hello world example:

// /home/myitcv/gostuff/src/github.com/myitcv/hello/hello.go

package main
import "fmt"

func main() {
  fmt.Printf("Hello world!\n")
}

Checking :set makeprg:

makeprg=go build $* ~/gostuff/src/github.com/myitcv/hello

Then :make produces:

can't load package: package /home/myitcv/gostuff/src/github.com/myitcv/hello: import "/home/myitcv/gostuff/src/github.com/myitcv/hello": cannot import absolute path

Any thoughts on what I'm missing here?

Incidentally, :set makeprg=go\ build works as expected.

Thanks in advance. Great integration with gocode

volgar1x commented 10 years ago

There still are some work to accept multiple path contained in $GOPATH

myitcv commented 10 years ago

Ah, thanks for the heads up.

volgar1x commented 10 years ago

Have you tried to manually set a single path to $GOPATH?

myitcv commented 10 years ago

No change unfortunately.