You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.
I have a program with import path go.company.com/team/prog1 which has "subpackages" inside it, committed to its repo as e.g. go.company.com/team/prog1/helper. I've vendored all the external (other repo) dependencies with godep. Now I'm trying to automate the build and test steps in an external build tool, and prog1's dependencies on its own subpackages cause build failures when cloned outside of a GOPATH:
$ unset GOPATH # only here for clarity, it was actually never set in the first place
$ git clone go.company.com/team/prog1
$ cd prog1
$ godep go test ./...
sourcefile.go:13:2: cannot find package "go.company.com/team/prog1/helper" in any of:
/usr/lib/golang/src/pkg/go.company.com/team/prog1/helper (from $GOROOT)
/home/user/prog1/Godeps/_workspace/src/go.company.com/team/prog1/helper (from $GOPATH)
...repeated likewise for all the other subpackage imports...
I've worked around this issue by instead doing this:
$ mkdir -p src/go.company.com/team
$ git clone go.company.com/team/prog1 src/go.company.com/team/prog1
$ export GOPATH=`pwd`
$ cd src/go.company.com/team/prog1
$ godep go test ./...
But this feels like an unneccessary and unintended complication, especially since the exact same script works perfectly fine for a program that does not import any of its own "subpackages".
Before godep was around (near Go 1.0), the build script I wrote for another project to do similar things would copy the repo's contents inside the vendoring workspace, which allowed these "subpackages" to work. That doesn't seem reasonable for godep though, since committing your workspace is the intended use case...
The text was updated successfully, but these errors were encountered:
I have a program with import path
go.company.com/team/prog1
which has "subpackages" inside it, committed to its repo as e.g.go.company.com/team/prog1/helper
. I've vendored all the external (other repo) dependencies with godep. Now I'm trying to automate the build and test steps in an external build tool, and prog1's dependencies on its own subpackages cause build failures when cloned outside of a GOPATH:I've worked around this issue by instead doing this:
But this feels like an unneccessary and unintended complication, especially since the exact same script works perfectly fine for a program that does not import any of its own "subpackages".
Before godep was around (near Go 1.0), the build script I wrote for another project to do similar things would copy the repo's contents inside the vendoring workspace, which allowed these "subpackages" to work. That doesn't seem reasonable for
godep
though, since committing your workspace is the intended use case...The text was updated successfully, but these errors were encountered: