Moved logic which validates jvm platform dependencies.

Review Request #2565 - Created Aug. 3, 2015 and submitted

Information
Garrett Malmquist
pants
gmalmquist/platform-tree
1913
8224d39...
Reviewers
pants-reviews
jsirois, stuhood, zundel

The logic which checked to make sure no targets depended on other
targets with newer jdks was previously in jvm_compile, which caused
it to be re-ran for every single type of jvm compilation. It also
failed fast and had no option to simply warn and continue, which
made it hard and frustrating to debug.

JvmPlatformValidate is a new task whose sole purpose is performing
this validation. It runs fairly early in the build lifecycle, which
prevents pants from doing too much work before erroring on a doomed
run.

It also allows the error message to be disabled, or demoted to a warning.

Also included is a jvm platform debugging resource which I developed
(along with the previous change) to help me sort out many
jvm platform dependency problems in square's internal java repo.

This is done in the JvmPlatformExplain console task, which performs
a more detailed analysis of the target level constraints imposed on
targets by their dependencies and dependees (a target cannot have a
higher -target than its dependees, or a lower -target than its
dependencies).

Existing tests modified, additional unit tests added in
test_jvm_platform_analysis.py.

CI went green: https://travis-ci.org/pantsbuild/pants/builds/74087340
Again: https://travis-ci.org/pantsbuild/pants/builds/74116016
Again: https://travis-ci.org/pantsbuild/pants/builds/74124235

Garrett Malmquist
John Sirois
Garrett Malmquist
John Sirois
John Sirois
Garrett Malmquist
Garrett Malmquist
Review request changed

Status: Closed (submitted)

Change Summary:

In commit b4581cfba426db0abdc923546c7de95128d5400d

Loading...