Fix regression in synthetic target context handling.

Review Request #1921 — Created March 15, 2015 and submitted

nhoward_tw
pants
11e231b...
pants-reviews
ity, jsirois, patricklaw, tejal

This fixes an issue I ran into testing the changes I introduced on Friday. The problem was that if you set derived_from to None, when applying the synthetic targets by their derived targets, the derived target would be None, so it would raise an error on the logging line I added. I removed the log line, since after thinking about it, I don't think it's necessary. Also I guarded adding targets to the synthetic target dict because if derived_from _is_ None, then it won't be used, so there's no point in adding it.

added regression tests, ran them. Ran against command I was testing with and saw it succeed. CI baking here: https://travis-ci.org/pantsbuild/pants/builds/54474855

JS
  1. 
      
  2. Lifting the 1st arg up a line is more typical of the codebase - ditto for lines 110-111 below.
  3. 
      
NH
TE
  1. Ship It!
  2. 
      
IT
  1. lgtm!

  2. 
      
NH
Review request changed

Status: Closed (submitted)

Change Summary:

submitted at e553ccdfdd77c80f3cb078eaa5bd2f81340467a7

Loading...