Fix regression in synthetic target context handling.
Review Request #1921 - Created March 15, 2015 and submitted
|Nick Howard (Twitter)|
|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