Transition Graal to Java 8
Doug Simon
doug.simon at oracle.com
Wed Apr 2 11:29:51 UTC 2014
Checkstyle has now been temporarily disabled which means using Java8 features in Graal is ok.
-Doug
On Mar 29, 2014, at 12:06 AM, Doug Simon <doug.simon at oracle.com> wrote:
> I’m thinking that it might be best to simply disable Checkstyle until it supports Java8 or we have a replacement for it. What do the other Graal devs say?
>
> While I’m sure everyone would conscientiously try to adhere to the style guide currently enforce by Checkstyle, there will inevitably be some cleanup necessary once Checkstyle is re-enabled. But I think that’s a fair trade off for being able to use Java8 features earlier.
>
> -Doug
>
> On Mar 28, 2014, at 7:56 PM, Deneau, Tom <tom.deneau at amd.com> wrote:
>
>> Doug --
>>
>> So if we have junit tests that use the java8 lambda feature, should we wait
>> until the checkstyle update/replacement that you mention in #6 below before
>> proposing these as additions?
>>
>> -- Tom
>>
>>> -----Original Message-----
>>> From: graal-dev [mailto:graal-dev-bounces at openjdk.java.net] On Behalf Of
>>> Doug Simon
>>> Sent: Wednesday, March 26, 2014 5:53 PM
>>> To: graal-dev at openjdk.java.net
>>> Subject: Transition Graal to Java 8
>>>
>>> The changeset[1] has just gone through that transitions the non-pure-
>>> Truffle projects in the Graal repository to Java 1.8.
>>>
>>> The recommended steps for transitioning a local workspace are:
>>>
>>> 1. Ensure Eclipse is running on a 1.8 VM by editing eclipse.ini in the
>>> Eclipse installation directory (Eclipse.app/Contents/MacOS/eclipse.ini
>>> on Mac) to include these lines:
>>>
>>> -vm
>>> /path/to/jdk1.8.0/bin/java
>>>
>>> or on a Mac:
>>>
>>> -vm
>>> /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/ser
>>> ver/libjvm.dylib
>>>
>>>
>>> 2. Ensure you are using an Eclipse that has 1.8 support. This is one of
>>> the following:
>>> - Luna (4.4), version I20140318-0830 or later
>>> - Kepler (4.3.2) with the patch at
>>> http://download.eclipse.org/eclipse/updates/4.3-P-builds installed.
>>> Only select "Eclipse JDT (Java Development Tools) Patch with Java 8
>>> support (for Kepler SR2)" unless
>>> you already have PDE installed.
>>> 3. Configure the JavaSE-1.7 and JavaSE-1.8 Execution Environments
>>> appropriately in Eclipse (Preferences -> Java -> Installed JREs ->
>>> Execution Environments) 4. If you want to build with ECJ, then download
>>> it[2] to mx/ecj.jar 5. Update mx/env so that JAVA_HOME points to the 1.8
>>> JDK and add a property EXTRA_JAVA_HOMES to point to a 1.7 JDK.
>>> For example:
>>>
>>>
>>> JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
>>>
>>> EXTRA_JAVA_HOMES=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Conte
>>> nts/Home
>>>
>>> 6. Do a complete clean (just to be sure):
>>>
>>> mx clean
>>> mx ideclean
>>> mx eclipseinit
>>>
>>> 6. Remove and re-add all projects in Eclipse.
>>>
>>> Note that it is not yet quite open season on using Java 8 language
>>> features as Checkstyle does not yet support Java 8. In all likelihood we
>>> will replace Checkstyle with error-prone[3]. Either way, Checkstyle will
>>> be pulled out soon which removes the last road block to adopting all of
>>> Java 8.
>>>
>>> -Doug
>>>
>>> [1] http://hg.openjdk.java.net/graal/graal/rev/a6c1c3eb20c4
>>> [2] http://download.eclipse.org/eclipse/downloads/drops4/P20140317-
>>> 1600/download.php?dropFile=ecj-P20140317-1600.jar
>>> [3] https://code.google.com/p/error-prone/
>>
>
More information about the graal-dev
mailing list