Re: javac on java1.5

2006-03-23 Thread Dominique Devienne
 Specifically, it appears to be defaulting to source=1.5
 [...]
 I checked out the source in CVS; they are not saying source=1.5; they
 are not saying anything about the source version. Yet javac has switched
 to java1.5. This is breaking backwards compatibility for builds.

It was always my understanding that javac, just like SUN's compiler,
always defaults to the current Java source level for the JDK.

Wrong assumption? The fact that the Java language evolves, making
older sources incompatible with it, is not really pointing to a BC
issue for javac IMHO.

Gump moving to 1.5 has got to have consequences, it can't be
transparent, when new keywords and classes are added to the platform
(even new classes can break the source, when it's using import foo.*).
--DD

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: javac on java1.5

2006-03-23 Thread Steve Loughran

Dominique Devienne wrote:

Specifically, it appears to be defaulting to source=1.5
[...]
I checked out the source in CVS; they are not saying source=1.5; they
are not saying anything about the source version. Yet javac has switched
to java1.5. This is breaking backwards compatibility for builds.


It was always my understanding that javac, just like SUN's compiler,
always defaults to the current Java source level for the JDK.

Wrong assumption? The fact that the Java language evolves, making
older sources incompatible with it, is not really pointing to a BC
issue for javac IMHO.

Gump moving to 1.5 has got to have consequences, it can't be
transparent, when new keywords and classes are added to the platform
(even new classes can break the source, when it's using import foo.*).
--DD


Gump didnt want to move to java1.5; junit forced their hand. Now old 
code, code that built and worked happily, has broken. The usual cause is 
that enum is now reserved.


Now, when rmic's dependency logic broke moving up to 1.5, I fixed it 
by forcing the proxy generation to be downwards compatible, so 
everything behaved as on a 1.3 or 1.4 box.


Here are some options
(1) tweak javac to build at 1.4 or below unless stated.

(2) provide a back door switch to let gump control the jvm version. that 
way old code can be built under a new compiler.


#2 has appeal.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: javac on java1.5

2006-03-23 Thread Dominique Devienne
 Now, when rmic's dependency logic broke moving up to 1.5, I fixed it
 by forcing the proxy generation to be downwards compatible, so
 everything behaved as on a 1.3 or 1.4 box.

True, and was probably the right choice. But there are fewer rmic
users than javac users, so impacts less people.

 Here are some options
 (1) tweak javac to build at 1.4 or below unless stated.

I think this would be surprising, since javac would behave
differently than javac the command line app.

 (2) provide a back door switch to let gump control the jvm version. that
 way old code can be built under a new compiler.

 #2 has appeal.

Just like you, I'd rather avoid a magic property for gump, but I don't
see another solution, since I'm not fond of #1. I won't -1 #1 yet, but
I don't like it. --DD

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: javac on java1.5

2006-03-23 Thread Peter Reilly
#1 would not be backwardly compatible !

I am not too sure about #2. In the ant build
file we had to deal with this issue for a while,
it may be as well to get other project 1.5 aware.
Also new projects would have to set things so
that 1.5 (and higher) would work.

Peter


On 3/23/06, Steve Loughran [EMAIL PROTECTED] wrote:

 Dominique Devienne wrote:
  Specifically, it appears to be defaulting to source=1.5
  [...]
  I checked out the source in CVS; they are not saying source=1.5; they
  are not saying anything about the source version. Yet javac has
 switched
  to java1.5. This is breaking backwards compatibility for builds.
 
  It was always my understanding that javac, just like SUN's compiler,
  always defaults to the current Java source level for the JDK.
 
  Wrong assumption? The fact that the Java language evolves, making
  older sources incompatible with it, is not really pointing to a BC
  issue for javac IMHO.
 
  Gump moving to 1.5 has got to have consequences, it can't be
  transparent, when new keywords and classes are added to the platform
  (even new classes can break the source, when it's using import foo.*).
  --DD

 Gump didnt want to move to java1.5; junit forced their hand. Now old
 code, code that built and worked happily, has broken. The usual cause is
 that enum is now reserved.

 Now, when rmic's dependency logic broke moving up to 1.5, I fixed it
 by forcing the proxy generation to be downwards compatible, so
 everything behaved as on a 1.3 or 1.4 box.

 Here are some options
 (1) tweak javac to build at 1.4 or below unless stated.

 (2) provide a back door switch to let gump control the jvm version. that
 way old code can be built under a new compiler.

 #2 has appeal.



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: javac on java1.5

2006-03-23 Thread Steve Loughran

Peter Reilly wrote:

#1 would not be backwardly compatible !

I am not too sure about #2. In the ant build
file we had to deal with this issue for a while,
it may be as well to get other project 1.5 aware.
Also new projects would have to set things so
that 1.5 (and higher) would work.



Telling people to say you must declare a java version is no big deal; 
its easily done. But there are a lot of projects out there that built 
happily, and which now dont because gump upgraded.


Furthermore, what if we can't upgrade them all? There are old projects 
out there that havent had a change for 12+ months, but which still work. 
Its only that they dont compile on java1.5.


if we the properties ant._internal._javac.source and 
ant._internal._javac.target that set the defaults for javac, then you 
can also use them on the command line to build anything 'legacy', 
without touching the build file.



-steve




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: javac on java1.5

2006-03-23 Thread Peter Reilly
Perhaps this could be in the gump definition of a project?

Peter


On 3/23/06, Steve Loughran [EMAIL PROTECTED] wrote:

 Peter Reilly wrote:
  #1 would not be backwardly compatible !
 
  I am not too sure about #2. In the ant build
  file we had to deal with this issue for a while,
  it may be as well to get other project 1.5 aware.
  Also new projects would have to set things so
  that 1.5 (and higher) would work.
 

 Telling people to say you must declare a java version is no big deal;
 its easily done. But there are a lot of projects out there that built
 happily, and which now dont because gump upgraded.

 Furthermore, what if we can't upgrade them all? There are old projects
 out there that havent had a change for 12+ months, but which still work.
 Its only that they dont compile on java1.5.

 if we the properties ant._internal._javac.source and
 ant._internal._javac.target that set the defaults for javac, then you
 can also use them on the command line to build anything 'legacy',
 without touching the build file.


 -steve




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: javac on java1.5

2006-03-23 Thread Dominique Devienne
 if we the properties ant._internal._javac.source and
 ant._internal._javac.target that set the defaults for javac, then you
 can also use them on the command line to build anything 'legacy',
 without touching the build file.

Even though someone could abuse these Magic properties for other
purposes, I'd prefer something like ant.gump.javac.{source|target} or
something dramatic like ant.override-attributes.javac.{source|target}.
--DD

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: javac on java1.5

2006-03-23 Thread Stefan Bodewig
On Thu, 23 Mar 2006, Steve Loughran [EMAIL PROTECTED] wrote:
 Now that Gump has switched to java1.5, its showing up some problems
 in javac.
 
 Specifically, it appears to be defaulting to source=1.5

Please take the time and look into the manual page of the task, in
particular the bold-face notes on the target and source attributes ;-)

 This is breaking backwards compatibility for builds.

Quite the opposite.  Changing javac's behaviour to default to 1.3 or
something would have broken working builds on Java 1.5 when we started
to work on 1.5 support for 1.6(.2 or something).

 Also, javac shouldnt warn people about source=1.2 on every
 compile:
 
   Once per build should suffice.

+1

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: javac on java1.5

2006-03-23 Thread Stefan Bodewig
On Thu, 23 Mar 2006, Steve Loughran [EMAIL PROTECTED] wrote:

 Gump didnt want to move to java1.5;

Well, Gump being what it is should be running Mustang beta by now.
Not running 1.5 was mainly influenced by not havong one installed on
vmgump and people not having time to install it.

 junit forced their hand.

It finally pushed me to start a one hour upload of the Linux JDK
instead of playing with my kids on a weekend ;-)

 Here are some options
 (1) tweak javac to build at 1.4 or below unless stated.

-1, too late.

 (2) provide a back door switch to let gump control the jvm
 version. that way old code can be built under a new compiler.

+0

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]