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
CI went green here: