Define a lifecycle for Config objects.

Review Request #2920 - Created Oct. 2, 2015 and submitted

Information
John Sirois
pants
jsirois/engine/exp/graph/inherit
2302, 2308
2914
2924
8e36536...
Reviewers
pants-reviews
patricklaw, stuhood, zundel
The lifecycle is enforced by `Graph` and includes new support for:
1. Resolved object replacement:
   This is used to implement 2 forms of value inheritance, aka.
   templating.
2. Resolved object validation:
   This gives a first class home for validation logic and ensures the
   full hydrated object closure is available to run that logic against.

Additionally, `Graph` gains support for cycle detection at resolve time
and it now plumbs resolved objects addresses into their `address` field.

 src/python/pants/engine/exp/BUILD                                                  |  23 ++++---
 src/python/pants/engine/exp/addressable.py                                         | 159 ++++++++++++++++++++++++++++++++++++------
 src/python/pants/engine/exp/graph.py                                               |  86 +++++++++++++++++------
 src/python/pants/engine/exp/mapper.py                                              |   2 +-
 src/python/pants/engine/exp/{serializable.py => objects.py}                        |  36 ++++++++++
 src/python/pants/engine/exp/parsers.py                                             |   2 +-
 src/python/pants/engine/exp/targets.py                                             | 186 ++++++++++++++++++++++++++++++++++++++++++++++----
 tests/python/pants_test/engine/exp/examples/graph_test/self_contained.BUILD        |  57 +++++++++++++---
 tests/python/pants_test/engine/exp/examples/graph_test/self_contained.BUILD.json   |   3 +
 tests/python/pants_test/engine/exp/examples/graph_test/self_contained.BUILD.python |   3 +
 tests/python/pants_test/engine/exp/test_graph.py                                   |  15 ++--
 11 files changed, 488 insertions(+), 84 deletions(-)
CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/83265481
John Sirois
John Sirois
Eric Ayers
John Sirois
John Sirois
John Sirois
John Sirois
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...