Add transitive parameter to UnionProducts.get_for_target(s)

Review Request #2741 — Created Aug. 31, 2015 and submitted

Patrick Lawson
pants
73b2e67...
pants-reviews
jsirois, nhoward_tw, stuhood, zundel

Add transitive parameter to UnionProducts.get_for_target[s]

CI is baking: https://travis-ci.org/pantsbuild/pants/builds/78112646

Added tests for the new parameter to:
* tests/python/pants_test/goal/test_union_products.py:test_get_for_target.

Patrick Lawson
Stu Hood
  1. Ship It!
  2. 
      
John Sirois
  1. 
      
  2. src/python/pants/goal/products.py (Diff revision 1)
     
     

    a 1 line deps = x if ... might be nice here

    1. I strongly disike Python's ternary syntax and avoid it like the plague. If we had a concrete style guide I'd strongly favor banning it outright in the repo.

    2. Heh - fair enough.  That PEP does read like a bike shed factory convention!
  3. 
      
Nick Howard (Twitter)
  1. LGTM, though you'll also need to update ClasspathProducts' get_for_targets too.

    1. Agreed, but I'm going to punt on that in this change. It seems like the transitive exclusions complicate that class quite a bit more than here, and we also don't have a present use for that option in ClasspathProducts as yet.

    2. Ah, doh, today is not my day. I was under the impression that compile_classpath was UnionProducts rather than ClasspathProducts (perhaps because we're still behind by a couple of weeks). I'll follow up.

  2. 
      
Patrick Lawson
Patrick Lawson
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks guys, submitted @ f5ff8d06f8aa141ae78e303443beabf2c1b7d06f

Loading...