Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building fails for packages in subdirectories #29

Open
jfindley opened this issue Jul 1, 2016 · 0 comments
Open

Building fails for packages in subdirectories #29

jfindley opened this issue Jul 1, 2016 · 0 comments

Comments

@jfindley
Copy link

jfindley commented Jul 1, 2016

Given an import path of github.com/foo/bar/baz, where the repo is github.com/foo/bar, building will fail.

Example:

docker run --rm \
        --privileged \
        -v /Users/jfindley/go/src/github.com/nutmegdevelopment/sumologic/filestream:/src \
        -e CGO_ENABLED=0 \
        -e LDFLAGS='-s -extldflags -static' \
        -v /var/run/docker.sock:/var/run/docker.sock \
        centurylink/golang-builder \
        localhost/filestream:latest
github.com/dleung/gotail (download)
Fetching https://gopkg.in/fsnotify.v1?go-get=1
Parsing meta tags from https://gopkg.in/fsnotify.v1?go-get=1 (status code 200)
get "gopkg.in/fsnotify.v1": found meta tag main.metaImport{Prefix:"gopkg.in/fsnotify.v1", VCS:"git", RepoRoot:"https://gopkg.in/fsnotify.v1"} at https://gopkg.in/fsnotify.v1?go-get=1
gopkg.in/fsnotify.v1 (download)
Fetching https://golang.org/x/sys/unix?go-get=1
Parsing meta tags from https://golang.org/x/sys/unix?go-get=1 (status code 200)
get "golang.org/x/sys/unix": found meta tag main.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
Fetching https://golang.org/x/sys?go-get=1
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
golang.org/x/sys (download)
github.com/nutmegdevelopment/sumologic (download)
package github.com/nutmegdevelopment/sumologic/upload: /go/src/github.com/nutmegdevelopment/sumologic exists but /go/src/github.com/nutmegdevelopment/sumologic/.git does not - stale checkout?
github.com/stretchr/testify

This is because build_environment.sh links /src into the GOPATH, making clones into the parent dir fail.

We are currently using this patch:
https://github.com/nutmegdevelopment/golang-builder/commit/ced5b2148ce452a45313678d6329963a3213b287

Note that it also disabled the GO15VENDEREXPERIMENT stuff, as that's now part of current (1.6) go, so shouldn't be needed anymore.

We alos disabled godeps support as we had issues making that work too.

I can split the above patch into separate commits, if you're interested in accepting some/all of these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant