Explicitly track when synthetic targets are injected.

Review Request #3277 - Created Dec. 20, 2015 and submitted

Information
Patrick Lawson
pants
2749
Reviewers
pants-reviews
benjyw, jsirois, molsen, zundel

Previously some degree of tracking was done in Context to ensure
that synthetic targets were pulled into context.targets() if their
concrete ancestors were in the root targets of the graph. However,
recent work by Matt Olsen in https://rbcommons.com/s/twitter/r/3225/
revealed a more subtle issue with BuildGraph's handling of
synthetic targets: some synthetic targets do not have meaningful
ancestors, and we currently don't model that case.

This change makes it so that being "derived from" some other target
is sufficient but no longer necessary to be considered "synthetic".
Callers of BuildGraph.inject_target can now pass synthetic=True
to force this attribute of a target, even if it does not derive
from another target. In particular, BuildGraph.inject_synthetic_target
passes synthetic=True.

CI is green:
https://travis-ci.org/pantsbuild/pants/builds/97998009

Patrick Lawson
Benjy Weinberger
Eric Ayers
Patrick Lawson
Eric Ayers
Patrick Lawson
Patrick Lawson
Review request changed

Status: Closed (submitted)

Change Summary:

Upstream @ 25dc26d988ef59da8e1b00385cc0570f1ca06f5f

Loading...