Use list comprehension in jvm_compile to calculate valid targets

Review Request #2843 - Created Sept. 18, 2015 and submitted

Information
Nick Howard (Twitter)
pants
2216
bfb9438...
Reviewers
pants-reviews
benjyw, jsirois, stuhood

While looking at vts usages when adjusting buildcache for adding the cache hit callback, I noticed that we are doing extra work here.

Instead of doing set math with relevant_targets and invalid_targets, this creates a list from the all_vts' targets, removing the invalid ones. all_vts in this context maps onto relevant_targets, so they are equivalent but I think this is simpler and creates fewer intermediate objects / operations.

CI away at https://travis-ci.org/pantsbuild/pants/builds/81050720 . I ran some integration tests locally and had both implementations with an assert containing an equality check. I would have expected the assert to blow up if my assumptions were incorrect.

John Sirois
Stu Hood
Nick Howard (Twitter)
Review request changed

Status: Closed (submitted)

Change Summary:

https://github.com/pantsbuild/pants/commit/f9fce86eb8c98e50a5808d01b6c7b3e392bb304c

Nick Howard (Twitter)

Submitted at https://github.com/pantsbuild/pants/commit/f9fce86eb8c98e50a5808d01b6c7b3e392bb304c. Thanks folks!

Benjy Weinberger
Ship It!
Loading...