Make pants a good example of Go contrib usage.

Review Request #3889 — Created May 13, 2016 and submitted — Latest diff uploaded

jsirois
pants
jsirois/issues/3424/buildgen-working
3424, 3443
3888
4bad0ce...
pants-reviews
benjyw, dturner-tw, kwlzn
This fixes the pants repo to be `buildgen` compatible and `buildgen`
tested. To do so, extraneous and `buildgen` illegal Go source roots used
for tests are eliminated and `buildgen` is added to CI to ensure
compliance with its strictures. Along the way a misconception about how
`go_remote_library` works is corrected in a test: in short, there is no
choice about where a `go_remote_library` BUILD file lives, it must live
at the remote repo "root".

 contrib/go/3rdparty/go/github.com/apache/thrift/lib/go/thrift/BUILD                   |  3 --
 contrib/go/examples/3rdparty/go/github.com/gorilla/context/BUILD                      |  4 ++-
 contrib/go/examples/3rdparty/go/github.com/gorilla/mux/BUILD                          |  4 ++-
 contrib/go/examples/3rdparty/go/gopkg.in/check.v1/BUILD                               |  7 +---
 contrib/go/examples/3rdparty/go/gopkg.in/fsnotify.v0/BUILD                            | 10 +-----
 contrib/go/testprojects/src/go/libUnstyle/BUILD                                       |  1 -
 contrib/go/testprojects/src/go/libUnstyle/unstyle.go                                  | 10 ------
 contrib/go/testprojects/src/go/libUnstyle/unstyle_test.go                             | 12 -------
 contrib/go/testprojects/src/go/usethrift/BUILD                                        |  5 ---
 contrib/go/testprojects/src/go/usethrift/example.go                                   |  8 -----
 contrib/go/testprojects/src/thrift/thrifttest/BUILD                                   |  4 ---
 contrib/go/testprojects/src/thrift/thrifttest/duck.thrift                             |  8 -----
 contrib/go/tests/python/pants_test/contrib/go/tasks/BUILD                             |  3 ++
 contrib/go/tests/python/pants_test/contrib/go/tasks/test_go_test_integration.py       | 38 +++++++++++++++-----
 contrib/go/tests/python/pants_test/contrib/go/tasks/test_go_thrift_gen_integration.py | 95 ++++++++++++++++++++++++++++++++++++++------------
 contrib/release_packages.sh                                                           |  2 +-
 pants.ini                                                                             | 14 ++++++--
 17 files changed, 126 insertions(+), 102 deletions(-)

Green locally:

./pants test contrib/go/tests/::
./pants test contrib/go/examples/::
./pants buildgen
./build-support/bin/release.sh -n

CI went green here:
http://jenkins.pantsbuild.org/job/pantsbuild/job/pants/branch/PR-3443/4/

Loading...