harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer" <nbe...@gmail.com>
Subject Re: ECJ set as default compiler (WAS: [general] version of gcc and other tools)
Date Mon, 16 Oct 2006 22:30:08 GMT
Every problem I ran into with Sun's compiler has been around generics
syntax and it's generally when the "? extends XXX" feature is used.
The errors general popup from the consumer-side. The class that has
bitten me multiple times is the ReferenceQueue and it's methods [1]
inside of a while loop.

At first, I thought these were problems with ECJ, but when I logged
bugs with them, they were always able to point to Sun's Bug parade for
the real issue and sure enough, when Sun's v5.0_8+ JDK came out, it
was fixed.

As to your question about testing with Sun's compiler; this is
probably a good idea. Something to try every once in a while.

Besides my personal preference for the ECJ over Sun's compiler, here
are my top reasons for Harmony to use it internally (in case anyone
cares and because I need to be more transparent)
* Harmony will use ECJ for the 'javac' tool and presumably to
implement the new Java compiler API (part of Java 7?). One of those
eat your $%*& things.
* ECJ has no built-in classpath, unlike Sun's javac, so compiling the
Harmony ClassLibrary is guaranteed to be compiled in complete
isolation.

-Nathan

[1] http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/ReferenceQueue.html#poll()

On 10/16/06, Gregory Shimansky <gshimansky@gmail.com> wrote:
> On Tuesday 17 October 2006 02:07 Nathan Beyer wrote:
> > I've set the default compiler value to use the ECJ adapter. I've also
> > added a check to fail the build (in build-java.xml and
> > build-tests.xml) if the ECJ adapter class is missing. The message says
> > that the ECJ JAR is missing and to copy it from the depends folder.
> >
> > If there are any changes or suggestions for a more elegant Ant
> > solution, just let me know and I'll add them.
> >
> > Note: The build seemingly takes a bit longer, as ECJ reports a
> > significant amount of warnings by default. Personally, these are
> > things I believe need to be cleaned up anyway (unused imports, missing
> > serialVersionUIDs, etc). I haven't figured out to configure the ECJ
> > options via the Ant task yet, so if anyone know, please let the list
> > know.
> >
> > Mark, Tim, IBM folks,
> > This may require an update to the automated builds if Ant isn't setup
> > like this yet, sorry.
>
> I want to ask how valid were the errors from Sun javac of 1.5.0_08 version
> which caused some compilation problems? Maybe it makes sense to check with
> Sun compiler once in a while?
>
> --
> Gregory Shimansky, Intel Middleware Products Division
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message