Support a non-inlined lazy resolve mode in Graph.

Review Request #2944 - Created Oct. 8, 2015 and submitted

Information
John Sirois
pants
jsirois/engine/graph/on_the_fly_traverse
2283, 2308, 2342
2945, 2947, 2952, 2950
95e6eeb...
Reviewers
pants-reviews
benjyw, ity, kwlzn, patricklaw, stuhood
The fundamental restructuring is moving from Addressed values to a
class-housed schema of addressable fields powered by a @property-like
`AddressableDescriptor` with write-once semantics and that can contain
`Resolvable` values in addition to opaque address strings and concrete
values.  This move reduces the memory requirements of parsing objects,
they are now just an object with a single `_kwargs` dict of unadorned
string address values in the addressable field case.

With the `Resolvable` type plumbed into addressable schemas, both the
json encoder and the Graph gain the ability to materialize or serialize
shallow or inlined graphs bringing the testable space of the noun side
of the experiment up to 3 parsers x 2 graph modes.

 src/python/pants/base/BUILD                            |   4 -
 src/python/pants/base/address.py                       |   2 -
 src/python/pants/engine/exp/BUILD                      |   1 +
 src/python/pants/engine/exp/addressable.py             | 342 ++++++++++++++++++++++++++++++++++++--------------
 src/python/pants/engine/exp/configuration.py           |  47 ++++---
 src/python/pants/engine/exp/graph.py                   | 117 +++++++++++------
 src/python/pants/engine/exp/objects.py                 |  19 ++-
 src/python/pants/engine/exp/parsers.py                 |  44 ++++---
 src/python/pants/engine/exp/targets.py                 |  40 +++---
 tests/python/pants_test/engine/exp/BUILD               |   1 +
 tests/python/pants_test/engine/exp/test_addressable.py | 303 +++++++++++++++++++++++++++++++++++++-------
 tests/python/pants_test/engine/exp/test_graph.py       |  96 +++++++++++++-
 tests/python/pants_test/engine/exp/test_parsers.py     |  70 +++++++++--
 13 files changed, 835 insertions(+), 251 deletions(-)
CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/84361801

Files


John Sirois
John Sirois
Benjy Weinberger
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...