Add support for collection wrapping a class

Review Request #3769 — Created April 27, 2016 and submitted

wisechengyi
pants
3169
pants-reviews
peiyu, stuhood

This change creates a pickleable, stable Collection class wrapping another class, which saves a few awkward class definitions.

https://travis-ci.org/wisechengyi/pants/builds/126255074

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
PE
  1. 
      
  2. src/python/pants/util/objects.py (Diff revision 1)
     
     

    add dependency to BUILD

  3. src/python/pants/util/objects.py (Diff revision 1)
     
     

    document ext, also something like element_type might be better

  4. src/python/pants/util/objects.py (Diff revision 1)
     
     
     

    this feels more reasonable, then we don't need this comment

    1. converted to an argument

  5. 
      
ST
  1. 
      
  2. src/python/pants/util/objects.py (Diff revision 1)
     
     

    Please add a comment about the ambition that this class will gain some native support for flattening.

    Also, this should not go in src/python/pants/util/objects.py quite yet... it's too specific to the engine. Maybe in selectors.py as a temporary location?

    1. comments added and moved to selectors.py

  3. 
      
WI
PE
  1. 
      
  2. defaults to just dependencies

    1. better idea. thanks!

  3. fix old name ext. do we need this?

  4. ditto: fix old name

    1. removed custom repl because the default already is self explanatory:
      {Collection(<class 'pants.engine.exp.fs'Dir'>)} Dir'>): Dirs(dependencies='123')

  5. 
      
WI
PE
  1. 
      
  2. src/python/pants/engine/exp/BUILD (Diff revision 3)
     
     
     

    sort

    1. ha, I did pay attention to this, but apparently I thought 't' was before 'm' ...

  3. 
      
WI
ST
  1. Ship It!
  2. 
      
WI
Review request changed

Status: Closed (submitted)

Change Summary:

281df88e4fd4a082a4dbef648535f3584b0dc124

Loading...