Adding jdk_paths option to jvm subsystem.

Review Request #2657 - Created Aug. 18, 2015 and submitted

Information
Garrett Malmquist
pants
gmalmquist/distribution-jvm-jdk-paths
2014
2692
231f15a...
Reviewers
pants-reviews
benjyw, jsirois, patricklaw, zundel
Distribution.locate now first checks the paths set in the jdk_paths
dictionary (according to the os name).

Changed option reference in unrelated test to avoid collision with
jvm subsystem.

Moved some common os-name logic to a new osutil.py, rather than
duplicating it in jvm.py.

Added tests to tests/python/pants_test/java/distribution/test_distribution_integration.py.

CI went green here: https://travis-ci.org/pantsbuild/pants/builds/76301770
CI went green here: https://travis-ci.org/pantsbuild/pants/builds/76310316
CI went green here: https://travis-ci.org/pantsbuild/pants/builds/76477412
CI went green here: https://travis-ci.org/pantsbuild/pants/builds/76509163

Issues

  • 1
  • 1
  • 0
  • 2
Description From Last Updated
Was on vacation for a bit: sorry for the laggard reviews. This seems like an obvious argument for the DistributionLocator ... Stu Hood Stu Hood
Garrett Malmquist
Garrett Malmquist
Eric Ayers
Eric Ayers
Benjy Weinberger
Garrett Malmquist
Benjy Weinberger
Benjy Weinberger
Garrett Malmquist
Garrett Malmquist
Review request changed

Status: Closed (submitted)

Change Summary:

In commit 86ed2dc0a804335fce009389dba92e17289a0bd5

Stu Hood

   

Off topic, but: is there a plan for unifying the platform and distribution? Presumably, anytime you use a particular platform, you must also find a compatible distribution.

That would provide the appropriate bootclasspath, which would be enough to kill the platform args parameter?

  1. Its a bit confusing because the 'platform' settings are about arguemnts to pass to the compiler. You can use the same JDK to compile for multiple 'platform' settings. Or fact, you may have to combine multiple JDK's to get it right (compiling with java 8 version of javac, but targeting a java 7 runtime with -Xbootclasspath). Once distribution lands, Garrett and I will take a stab at some documentation around this with some sample configs.

src/python/pants/backend/jvm/subsystems/jvm.py (Diff revision 5)
 
 
 
 
 
 

Was on vacation for a bit: sorry for the laggard reviews.

This seems like an obvious argument for the DistributionLocator rather than the JVM(Subsystem)? A particular platform requires a particular distribution, and the DistributionLocator seems like a well-factored middleman.

  1. A particular platform could run on many different possible distributions. For example, the distribution path may depend on the OS or what happens to be the convention installed on this particular machine. The platform settings don't necessarily need to know about that. You might update the distribution to a newer version of the JDK without having any impact on the platform settings.

Loading...