Migrate `pants.engine.exp` to `pants.engine.v2`.

Review Request #3800 — Created May 1, 2016 and submitted

kwlzn
pants
kwlzn/engine/exp_migration
3227, 3312
3798
pants-reviews
benjyw, jsirois, peiyu, stuhood

Motivated by and dependent on https://rbcommons.com/s/twitter/r/3798/ - these are split for easier reviewability but will land in lockstep.

  • Migrate `pants.engine.exp` wholesale to `pants.engine.v2` for general usage.
  • Migrate and fixup tests.

https://travis-ci.org/pantsbuild/pants/builds/126987522

  1. Thanks Kris!

    Two comments:

    1. The examples package should definitely stay experimental.
    2. The legacy package needs to be inlined into bin or renamed probably. exp.legacy already didn't make much sense.
    1. I had initially tried to keep examples in pants.engine.exp during this move, but due to a reliance on examples for a good chunk of tests it seemed to make sense to bring this along wholesale - lest we still draw lines across the exp boundary:

      [illuminati v2 (kwlzn/engine/exp_migration)]$ pwd
      /Users/kwilson/dev/pants/tests/python/pants_test/engine/v2
      [illuminati v2 (kwlzn/engine/exp_migration)]$ ag -G BUILD examples
      BUILD
      47:    'src/python/pants/engine/v2/examples:planners',
      58:    'src/python/pants/engine/v2/examples:parsers',
      73:    'src/python/pants/engine/v2/examples:parsers',
      85:    'src/python/pants/engine/v2/examples:parsers',
      104:    'src/python/pants/engine/v2/examples:planners',
      

      my thinking here was that we'd probably continue this proof-by-example approach as we go deeper into v2 and so the idea of having an examples module to showcase the engines capabilities seemed to make sense. should I take the time to refactor the tests to accomodate a split v2/exp boundary just for examples for this initial migration? I thought it probably wasn't worth it - but I'm definitely open to ideas.

      in terms of #2, my thinking was that with a generational-aligned module grouping (e.g. as pants.engine.v2 vs fully sunk into pants.engine) that the idea of "legacy" as reach-back into the v1 generation made much more sense. I'm happy to sink this - but ultimately feel like there's at least some benefit in staying grouped under the "legacy" naming based on the nature of these objects.

    2. I had initially tried to keep examples in pants.engine.exp during this move, but due to a reliance on examples for a good chunk of tests it seemed to make sense to bring this along wholesale - lest we still draw lines across the exp boundary

      Maybe the right way to do this would be to move the examples into the tests/**/engine/examples directory then?

      in terms of #2, my thinking was that with a generational-aligned module grouping (e.g. as pants.engine.v2 vs fully sunk into pants.engine) that the idea of "legacy" as reach-back into the v1 generation made much more sense. I'm happy to sink this - but ultimately feel like there's at least some benefit in staying grouped under the "legacy" naming based on the nature of these objects.

      I don't have a very strong preference. If other folks are fine with the v2 subdirectory, then I am. But I think that keeping things in a subdirectory basically guarantees another move somewhere down the line.

    3. Maybe the right way to do this would be to move the examples into the tests/**/engine/examples directory then?

      hmm, good idea - I'll give that a go.

    4. fixed.

  2. 
      
  1. this lgtm

  2. remove Experimental in ExperimentalSchedulerTest

  3. 
      
  1. What Stu said... Although I'm not sure where examples should go TBH.

  2. 
      
  1. Ship It!
  2. 
      
Review request changed

Status: Closed (submitted)

Change Summary:

thanks folks! submitted @ 8975e5a40bece5a04a1f69c029d30e62e2160beb

Loading...