GitHub user vanzin opened a pull request:
https://github.com/apache/spark/pull/13272
[SPARK-15451][build] Use jdk7's rt.jar when available.
This helps with preventing jdk8-specific calls being checked in,
because PR builder are running the compiler with the wrong settings.
If the JAVA_7_HOME env variable is set, assume it points at
a jdk7 and use it's rt.jar when invoking javac. For zinc, just run
it with jdk7, and disable it when building jdk8-specific code.
A big note for sbt usage: adding the bootstrap options forces sbt
to fork the compiler, and that disables incremental compilation.
That means that it's really not convenient to use for normal
development, but should be ok for automated builds.
Tested with JAVA_HOME=jdk8 and JAVA_7_HOME=jdk7:
- mvn + zinc
- mvn sans zinc
- sbt
Verified that in all cases, jdk8-specific library calls fail
compile.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vanzin/spark SPARK-15451
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/13272.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #13272
----
commit 50c581561fbfff701babf29866c06aa4328c5ff6
Author: Marcelo Vanzin <[email protected]>
Date: 2016-05-21T01:25:51Z
[SPARK-15451][build] Use jdk7's rt.jar when available.
This helps with preventing jdk8-specific calls being checked in,
because PR builder are running the compiler with the wrong settings.
If the JAVA_7_HOME env variable is set, assume it points at
a jdk7 and use it's rt.jar when invoking javac. For zinc, just run
it with jdk7, and disable it when building jdk8-specific code.
A big note for sbt usage: adding the bootstrap options forces sbt
to fork the compiler, and that disables incremental compilation.
That means that it's really not convenient to use for normal
development, but should be ok for automated builds.
Tested with JAVA_HOME=jdk8 and JAVA_7_HOME=jdk7:
- mvn + zinc
- mvn sans zinc
- sbt
Verified that in all cases, jdk8-specific library calls fail
compile.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]