Fix `buildgen.go` to be non-lossy for remote revs.

Review Request #3077 - Created Nov. 5, 2015 and submitted

Information
John Sirois
pants
jsirois/issues/2395
2395, 2499
3073
Reviewers
pants-reviews
kwlzn, mateor
Previously, in the preferred target scanning mode, `GoBuildgen` would
lose any rev written down in a `go_remote_library` target on disk.

This change adds a failing test that is fixed in `GoBuildgen`.

 contrib/go/src/python/pants/contrib/go/tasks/go_buildgen.py             |  6 ++++--
 contrib/go/tests/python/pants_test/contrib/go/tasks/test_go_buildgen.py | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 2 deletions(-)

Used this in scan mode (no targets) in the Medium/mono repo via:

PANTS_PYTHONPATH="['/home/jsirois/dev-jsirois-pants/contrib/go/src/python']" \
  /home/jsirois/dev-jsirois-pants/pants \
    --backend-packages="['pants.contrib.go']" \
    --plugins="[]" \
    buildgen.go --materialize --remote

That used to lose revs in 5 go_remote_library targets, it now preserves
them - ie: the buildgen is a noop.

CI went green here:
https://travis-ci.org/pantsbuild/pants/builds/89299589

John Sirois
John Sirois
Kelly Ellis
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...