Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 380106 - [1.8] Infrastructure support to enable Java 8 work
Summary: [1.8] Infrastructure support to enable Java 8 work
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: BETA J8   Edit
Assignee: Satyam Kandula CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 287648 380188
  Show dependency tree
 
Reported: 2012-05-21 03:00 EDT by Srikanth Sankaran CLA
Modified: 2012-06-26 23:16 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Srikanth Sankaran CLA 2012-05-21 03:00:19 EDT
1. A suitable branch needs to be created to host the work
       on Java8.
    2. Any disclaimer requirements in the form of README, license terms,
       copy right messages etc need to be understood and documented here
       so committers working on this effort can follow the norms.
    3. We need to enable Java 8 work by creating suitable constants
       in ClassFileConstants so source level, compliance level, code
       generation target level etc could be set to the new level.
    4. Options/Preference processing code should be augmented to
       allow, source, target and compliance could be set to the new
       level.
    5. Junit infrastructure should be changed to allows a 1.8 pass.
    6. Suitable JRE need to be identified and recommended for the use of
       the committers.
    7. Tests need to be run the at the new level with a suitable JRE and
       failures if any need to be triaged and attended to.
Comment 1 Srikanth Sankaran CLA 2012-05-21 03:02:22 EDT
Satyam, thanks for following up on this.

For (1) and (2) please work with Dani. No code should be
released until (1) and (2) are taken of.

You may want to look at all references to 

org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants.JDK1_7

to get a picture of the changes done for Java 7.
Comment 2 Srikanth Sankaran CLA 2012-05-23 01:00:21 EDT
(In reply to comment #0)
> 1. A suitable branch needs to be created to host the work
>        on Java8.
>     2. Any disclaimer requirements in the form of README, license terms,
>        copy right messages etc need to be understood and documented here
>        so committers working on this effort can follow the norms.


Dani, Any clarity on these items ? (1 is about branch name - to understand
if there is some requirements around it) Thanks.

(Grammar changes produce lots of binary files which cannot be shared
via a patch and so will come in the way of collaboration, reviews etc.)
Comment 3 Dani Megert CLA 2012-05-23 04:42:04 EDT
(In reply to comment #0)
> 1. A suitable branch needs to be created to host the work
>        on Java8.

==> BETA_JAVA8


>     2. Any disclaimer requirements in the form of README, license terms,
>        copy right messages etc need to be understood and documented here
>        so committers working on this effort can follow the norms.

Please add this wiki page: wiki.eclipse.org/JDT_Core/Java8
following the page we had for Java7: wiki.eclipse.org/JDT_Core/Java7
The first thing to add is #What_to_do_to_set_up_the_IDE

You must also add a section that tells that the following lines *must* be added in all copyright headers of created or modified files for the Java(TM) 8 implementation:

 * This is an implementation of an early-draft specification developed under the Java
 * Community Process (JCP) and is made available for testing and evaluation purposes
 * only. The code is not compatible with any specification of the JCP.
 *



Once we have something read to share, we will add a wiki similar to:
http://wiki.eclipse.org/index.php?title=JDT/Eclipse_Java_7_Support_%28BETA%29&direction=prev&oldid=263353
Comment 4 Dani Megert CLA 2012-05-23 04:42:44 EDT
(In reply to comment #2)
> (Grammar changes produce lots of binary files which cannot be shared
> via a patch and so will come in the way of collaboration, reviews etc.)

This will be quite easy using Gerrit.
Comment 5 Satyam Kandula CLA 2012-05-24 03:00:22 EDT
I am unable to push the BETA_JAVA8 branch. I get the message
####
pre-receive hook declined
*** creation of branch BETA_JAVA8 is not permitted. ***
####
As I understand the hook configuration to create the branch needs to modified atleast temporarily. Dani, How can we do this?
Comment 6 Satyam Kandula CLA 2012-05-24 05:42:45 EDT
(In reply to comment #5)
Thanks Dani. BETA_JAVA8 branch is created.
Comment 7 Satyam Kandula CLA 2012-05-25 08:57:19 EDT
Released the test changes through commit 15609ca5b715c56c97cf6995e327646cb9a6dd97
(In reply to comment #0)
> 1. A suitable branch needs to be created to host the work
>        on Java8.
BETA_JAVA8 is created

>     2. Any disclaimer requirements in the form of README, license terms,
>        copy right messages etc need to be understood and documented here
>        so committers working on this effort can follow the norms.
See comment 3

>     3. We need to enable Java 8 work by creating suitable constants
>        in ClassFileConstants so source level, compliance level, code
>        generation target level etc could be set to the new level.
Done

>     4. Options/Preference processing code should be augmented to
>        allow, source, target and compliance could be set to the new
>        level.
Done

>     5. Junit infrastructure should be changed to allows a 1.8 pass.
Done

>     6. Suitable JRE need to be identified and recommended for the use of
>        the committers.
Java8  b39 is available now. 

>     7. Tests need to be run the at the new level with a suitable JRE and
>        failures if any need to be triaged and attended to.
Will update with the test results
Comment 8 Srikanth Sankaran CLA 2012-05-25 10:11:48 EDT
(In reply to comment #7)
> Released the test changes through commit
> 15609ca5b715c56c97cf6995e327646cb9a6dd97

Thanks Satyam, You had the privilege of releasing the first commit
into the Java8 stream work !
Comment 9 Satyam Kandula CLA 2012-05-26 01:39:13 EDT
Fixed some tests failing because of infrastructure change through commit c53e368d261f2341743baa1024157841e94f1882.

Now only two tests fail - NullAnnotationTest.test_nonnull_parameter_015() and ullAnnotationTest.test_nonnull_parameter_016(). These tests were forced to fail in the Java 8 environment to take care of 308 changes.
Comment 10 Srikanth Sankaran CLA 2012-05-31 19:43:50 EDT
Satyam, could you raise a follow up defect to track the undoing
of the workarounds you have put in to deal with magic numbers still
showing up with JDK7 values in the reference compiler ?

Also a good time to document any loose ends we know of.
Comment 11 Satyam Kandula CLA 2012-06-01 09:35:07 EDT
(In reply to comment #10)
> Satyam, could you raise a follow up defect to track the undoing
> of the workarounds you have put in to deal with magic numbers still
> showing up with JDK7 values in the reference compiler ?
> 
Filed bug 381345 to take care of this.
Comment 12 Srikanth Sankaran CLA 2012-06-08 01:32:11 EDT
If the batch compiler also accepts 1.8 levels in source, compliance
and code generation settings, this bug looks ready to be closed.
(I didn't check it).

Thanks Satyam.
Comment 13 Srikanth Sankaran CLA 2012-06-08 01:33:59 EDT
I confirmed that the delta between the number of junit test points
when run with a 1.8 JRE and a 1.7 JRE and the delta between when run
with a 1.7 JRE and a 1.6 JRE tally correctly. So we have the tests
set up properly. At the moment all look green.
Comment 14 Satyam Kandula CLA 2012-06-08 02:27:33 EDT
(In reply to comment #13)
The wiki is remaining. I will finish off today.
Comment 15 Satyam Kandula CLA 2012-06-08 07:06:58 EDT
Added the wiki http://wiki.eclipse.org/JDT_Core/Java8.
Comment 16 Satyam Kandula CLA 2012-06-08 07:07:41 EDT
.
Comment 17 Srikanth Sankaran CLA 2012-06-12 04:50:27 EDT
(In reply to comment #12)
> If the batch compiler also accepts 1.8 levels in source, compliance
> and code generation settings, this bug looks ready to be closed.
> (I didn't check it).

Satyam, does this work as expected ? TIA.
Comment 18 Satyam Kandula CLA 2012-06-12 09:05:44 EDT
(In reply to comment #17)
> (In reply to comment #12)
> > If the batch compiler also accepts 1.8 levels in source, compliance
> > and code generation settings, this bug looks ready to be closed.
> > (I didn't check it).
> 
> Satyam, does this work as expected ? TIA.
Ooops, I missed this. Will fix this.
Comment 19 Satyam Kandula CLA 2012-06-12 09:19:18 EDT
(In reply to comment #18)
> (In reply to comment #17)
> > (In reply to comment #12)
> > > If the batch compiler also accepts 1.8 levels in source, compliance
> > > and code generation settings, this bug looks ready to be closed.
> > > (I didn't check it).
> > 
> > Satyam, does this work as expected ? TIA.
> Ooops, I missed this. Will fix this.
Released this via commit 2208491f1e360e4237b8017b36c8fa0890474137.
Comment 20 Srikanth Sankaran CLA 2012-06-14 02:46:44 EDT
(In reply to comment #19)

> > Ooops, I missed this. Will fix this.
> Released this via commit 2208491f1e360e4237b8017b36c8fa0890474137.

This test org.eclipse.jdt.core.tests.compiler.regression.BatchCompilerTest.test012()
seems to broken with this fix. Thanks for looking into this.
Comment 21 Satyam Kandula CLA 2012-06-14 06:56:26 EDT
(In reply to comment #20)
> (In reply to comment #19)
> 
> > > Ooops, I missed this. Will fix this.
> > Released this via commit 2208491f1e360e4237b8017b36c8fa0890474137.
> 
> This test
> org.eclipse.jdt.core.tests.compiler.regression.BatchCompilerTest.test012()
> seems to broken with this fix. Thanks for looking into this.
Fixed this through commit e5298d1520850b03997a0c0198af445e99f4d78c
Comment 22 Srikanth Sankaran CLA 2012-06-26 23:16:33 EDT
(In reply to comment #9)

> Now only two tests fail - NullAnnotationTest.test_nonnull_parameter_015() and
> ullAnnotationTest.test_nonnull_parameter_016(). These tests were forced to fail
> in the Java 8 environment to take care of 308 changes.

I have eliminated these forced failures having raised a follow up
defect to track the underlying investigation: bug 383595.