[engine] Move GraphValidator to examples and make scheduler optionally take a validator.

Review Request #3608 — Created March 25, 2016 and submitted


move GraphValidator

The scheduler.GraphValidator addresses a usecase that is very specific to the prototype implementation of targets under src/python/pants/engine/exp/examples/ namely, the case where only one literal config value has been provided in a BUILD file. It's also slow for repeated runs because it re-validates the entire graph, rather than just the portion that changed.

This change moves GraphValidator into examples and make scheduler optionally take a validator.


  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
  2. src/python/pants/engine/exp/examples/graph_validator.py (Diff revision 1)

    In order to move this code successfully into examples (without creating a cycle), I think you'd have to do this bit. Basically, you'd have to make it optional to pass in a GraphValidator.

    I think that that would be a good approach, despite what this comment says, but should definitely indicate that graph validation is experimental (it's expensive and usually unnecessary).

  3. I'm pretty sure this is a cyclic dep... the core package should not depend into the examples... only the other way around.

  1. Thanks!

  2. src/python/pants/engine/exp/examples/graph_validator.py (Diff revision 2)

    Please update this comment to indicate that this has been done, but that it's very experimental/slow.

  3. src/python/pants/engine/exp/scheduler.py (Diff revision 2)

    No need for a warning; I expect it will be a while before we actually use this code.

    1. moved into def schedule

Review request changed

Status: Closed (submitted)

Change Summary: