Fixup `GoFetch` to respect transitive injections.

Review Request #3270 - Created Dec. 18, 2015 and submitted

Information
John Sirois
pants
jsirois/issues/2733
2733, 2740
Reviewers
pants-reviews
mateor, nhoward_tw
Previously, a fetch could trigger injection of a `GoRemoteLibrary`
subgraph that was not tracked by `GoFetch` leading to the erroneous
assumption that it was safe to synthesize a target that was already
implicitly injected into the active graph.

Add a failing test for this scenario that is fixed by this change.

 contrib/go/src/python/pants/contrib/go/tasks/go_fetch.py             | 32 ++++++++++++++++----------------
 contrib/go/tests/python/pants_test/contrib/go/tasks/test_go_fetch.py | 14 +++++++++++---
 2 files changed, 27 insertions(+), 19 deletions(-)
I tested this in the Medium/mono repo and the change does fix their
problem.  A new unit test also emulates the problem and is likewise
fixed.

CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/97707029
Mateo Rodriguez
Vinny Fuentes
Chad Rhyner
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...