A new rebasing API.

Review Request #2154 — Created May 3, 2015 and submitted

benjyw
pants
c92b3b3...
pants-reviews
patricklaw, stuhood
- Matches the new (and more efficient) rebasing functionality in zincutils.
- Makes JMake analysis rebasing fit this new model.
- Adds a basic unittest for JMake analysis manipulation, finally.
- Gets rid of __eq__ and __hash__, which were both broken.
- Replaced with an is_equal_to method for use in tests.
- Introduces optional sorting of items, for ease of testing.

CI passes: https://travis-ci.org/pantsbuild/pants/builds/61062182

Did some java and scala building with artifact caching turned on and manually verified that the cached analysis files were properly relativized, and that the ones read back from the cache were properly localized.

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
PA
  1. 
      
  2. It would be nice to check this for falseyness, though it's not a blocker. There must be a utility function for this, and if there isn't we should write one for pants.

    1. Yeah, I will follow up with something like this here (and in zincutils) once I figure out how to do it neatly.

  3. .next() is gone in python3. There's probably a six compatibility function for this.

    1. Oh, next(...) was backported since 2.6+, so since we're 2.7+ it's safe to just always use next(...).

    2. There is indeed: from six import next, and then use it like py3's next.

  4. If i is unused, I prefer _ so it's easier to ignore.

  5. 
      
BE
BE
BE
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as 27d52530c1082680286f2e76466aee8f692d06d1.

ST
  1. Thanks Benjy.

  2. 
      
Loading...