go - go1.7 not reconizing vendor directory -
i have package i'm trying vendorize. uses capnproto2 package. builds without error when package under $gopath/src/zombiezen.com/go/capnproto2 fails when move vendor directory. project located under gopath.
$ go build ../fram/rim/fsd.go:7:8: cannot find package "zombiezen.com/go/capnproto2" in of: /home/mjohn/software/go/src/zombiezen.com/go/capnproto2 (from $goroot) /home/mjohn/workspace/gopath/src/zombiezen.com/go/capnproto2 (from $gopath) ../fram/rim/schema.capnp.go:7:2: cannot find package "zombiezen.com/go/capnproto2/encoding/text" in of: /home/mjohn/software/go/src/zombiezen.com/go/capnproto2/encoding/text (from $goroot) /home/mjohn/workspace/gopath/src/zombiezen.com/go/capnproto2/encoding/text (from $gopath) ../fram/rim/schema.capnp.go:8:2: cannot find package "zombiezen.com/go/capnproto2/schemas" in of: /home/mjohn/software/go/src/zombiezen.com/go/capnproto2/schemas (from $goroot) /home/mjohn/workspace/gopath/src/zombiezen.com/go/capnproto2/schemas (from $gopath)
my environment:
$ go env goarch="amd64" gobin="" goexe="" gohostarch="amd64" gohostos="linux" goos="linux" gopath="/home/mjohn/workspace/gopath" gorace="" goroot="/home/mjohn/software/go" gotooldir="/home/mjohn/software/go/pkg/tool/linux_amd64" cc="gcc" gogccflags="-fpic -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build069056451=/tmp/go-build -gno-record-gcc-switches" cxx="g++" cgo_enabled="1"
my project layout
$ pwd /home/mjohn/workspace/gopath/src/mjohn/msg $ ls cmd/main.go cmd/rpc.go vendor/zombiezen.com/go/capnproto2
obviously there's more in capnproto2 directory, copy $gopath/src/zombiezen.com/go/capnproto2.
any ideas on why go doesn't recognize vendor directory?
thank you.
the package mjohn/fram/rim
failing import zombiezen.com/go/capnproto2
, vendor directory in mjohn/msg
package.
you can either vendor mjohn/fram/rim
in it's entirety, including dependencies inside mjohn/msg
package, or can vendor zombiezen.com/go/capnproto2
in mjohn/fram/rim
package it's imported.
Comments
Post a Comment