Bug 354721 - ecj should default to -source 1.5
ecj should default to -source 1.5
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: ecj (Show other bugs)
10
All Linux
medium Severity low
: ---
: ---
Assigned To: Deepak Bhole
Fedora Extras Quality Assurance
bzcl34nup
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-26 15:31 EDT by Thomas Fitzsimmons
Modified: 2010-01-04 14:28 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-12-18 00:59:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
demonstrate 1.4 default source level (119 bytes, text/x-java)
2007-10-26 15:31 EDT, Thomas Fitzsimmons
no flags Details
test ecj jar (3.95 MB, application/x-java-archive)
2007-10-29 14:44 EDT, Andrew Overholt
no flags Details
test script - basically /usr/bin/ecj but using eclipse-ecj.jar in current directory (119 bytes, application/x-shellscript)
2007-10-29 14:56 EDT, Andrew Overholt
no flags Details

  None (edit)
Description Thomas Fitzsimmons 2007-10-26 15:31:18 EDT
$ rpm -q eclipse-ecj
eclipse-ecj-3.3.0-27.fc8

$ ecj Generics.java
----------
1. ERROR in Generics.java (at line 7)
        List<String> l;
        ^^^^
The type List is not generic; it cannot be parameterized with arguments <String>
----------
2. ERROR in Generics.java (at line 7)
        List<String> l;
             ^^^^^^
Syntax error, parameterized types are only available if source level is 5.0
----------
2 problems (2 errors)
Comment 1 Thomas Fitzsimmons 2007-10-26 15:31:18 EDT
Created attachment 239441 [details]
demonstrate 1.4 default source level
Comment 2 Andrew Overholt 2007-10-29 13:40:22 EDT
The upstream defaults are:

public long complianceLevel = ClassFileConstants.JDK1_4;
public long sourceLevel = ClassFileConstants.JDK1_3;
public long targetJDK = ClassFileConstants.JDK1_2;

Do we really want to change these?  Is -source 1.5 not good enough?  What's
Sun's default?  Since we're building 1.5 bytecode by default (including ecj
itself) should we default to 1.5?  Should we not be building 1.5 bytecode by
default (what about ecj itself)?
Comment 3 Andrew Haley 2007-10-29 13:50:11 EDT
We should default to Java 1.5 everywhere.  

The main point in having ecj on Fedora 8 is for Java compatibility, and Fedora 8
has Java 1.5 as the defualt everywhere except ecj.  (And, of course, IcedTea,
which is 1.7.)
Comment 4 Andrew Overholt 2007-10-29 13:55:16 EDT
(In reply to comment #3)
> We should default to Java 1.5 everywhere.  

Okay, I'll change the defaults.  People should still be able to use a lower
compliance level with the -source and -target options.  I'll post a custom
jdtcore.jar here for one of you test.
Comment 5 Andrew Haley 2007-10-29 14:21:12 EDT
I think this'll be fine.  I suppose there may be a theoretical possibility that
this breaks some ancient package, but we can't stay at Java 1.4 forever.
Comment 6 Andrew Overholt 2007-10-29 14:44:21 EDT
Created attachment 242291 [details]
test ecj jar

Here's a test jar.  Just put this somewhere and run the script I'll attach next
with Generics.java as an argument.  I'd really like it tested with some older
source and combinations of -source and -target options.

When we're satisfied, I'll put it in with the 3.3.1.1 update for F-8 that will
happen soon after release.

I agree staying on 1.4 forever isn't an option :)
Comment 7 Andrew Overholt 2007-10-29 14:56:12 EDT
Created attachment 242301 [details]
test script - basically /usr/bin/ecj but using eclipse-ecj.jar in current directory

Here's the (simply) modified /usr/bin/ecj - just put it and the previous
eclipse-ecj.jar in the same directory.
Comment 8 Bug Zapper 2008-04-04 10:18:48 EDT
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
rawhide.
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 9 Red Hat Bugzilla 2008-07-24 21:04:06 EDT
Adding patrickm@redhat.com to the cc list as the manager of the disabled user fitzsim@redhat.com who reported this bug
Comment 10 Bug Zapper 2008-11-26 03:06:52 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 11 Andrew Overholt 2008-11-26 10:07:17 EST
I don't think changing the defaults in the Eclipse IDE are a good idea.  I don't like deviating from upstream like that.  I propose that we have a separate ecj package (like in the past) that the gcj team can do with as they see fit.  Andrew, how does that sound to you?  I can offer the initial package and even do the review if you like.  The added benefit here is that platforms we're bootstrapping with Fedora won't have to worry about the cycle between eclipse and gcc (at the SRPM level).
Comment 12 Andrew Haley 2008-11-26 11:13:46 EST
Does the Eclipse IDE really still default to 1.4?  I find that surprising.
Actually, I find it bizarre.  But, no matter.

In any case, this bug only refers to the ecj command-line tool.  I have no desire to change anything in the IDE.  The problem is that every other Java compiler in Fedora is 1.5 by default (or even 1.6).  It's ecj that's out of step.

Anyway yes, that'd be fine.  Whatever it takes to get this long-standing bug fixed.
Comment 13 Andrew Overholt 2008-11-26 11:17:34 EST
You forget that ecj on the command line is just a thin wrapper around the exact same classes that are used in the IDE.

I will work on a separate package so you can make these kinds of changes.
Comment 14 Andrew Haley 2008-11-26 11:37:26 EST
But the IDE always overrides the sourcelevel that is the default in ecj.  So the only people exposed to the 1.4 default are those that use the command line.

Eclipse, when used as an IDE, seems to default to the compiler compliance level of the JRE that's being used.
Comment 15 Bug Zapper 2009-11-18 04:15:53 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 16 Bug Zapper 2009-12-18 00:59:56 EST
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 17 Deepak Bhole 2010-01-04 14:28:40 EST
This is no longer an issue by the way. In Fedora 12, it works fine:

$ rpm -q ecj
ecj-3.4.2-7.fc12.i686

$ ecj Generics.java 
----------
1. WARNING in Generics.java (at line 7)
        List<String> l;
                     ^
The local variable l is never read
----------
1 problem (1 warning)

Note You need to log in before you can comment on or make changes to this bug.