On 10/02/10 10:08 PM, Russel Winder wrote:
Is the person doing the Scala plugin for Gradle aware of this?
I guess that's me. I didn't know that we need to do 3 passes. We just do
the first 2 passes.
(I haven't checked the source code, so it may already be done like
this.)
-------- Forwarded Message --------
From: Jorge Ortiz<[email protected]>
To: Razvan Cojocaru<[email protected]>
Cc: [email protected]
Subject: Re: [scala-user] scalac and javac
Date: Tue, 9 Feb 2010 22:19:49 -0800
The scalac compiler does not compile Java source to bytecode. It
merely parses Java source in order to get the type information it
needs to compile the Scala source that depends on the Java source.
The recommended approach is to use a three-pass compile. Run scalac
once on *.scala and *.java files to produce Scala *.class files. Run
javac once on *.java files with Scala *.class files in the classpath
to produce Java *.class files. Run scalac again with the real Java
*.class files in case the Scala compiler made any incorrect
assumptions about them in the first pass.
This three-pass system is recommended but not necessary. Some people
have reported successful compilations with just two passes.
--j
On Tue, Feb 9, 2010 at 6:49 PM, Razvan Cojocaru<[email protected]>
wrote:
I have a mixed java/scala project. I created a build.xml with
only scalac and
it doesn't really compile the .java classes it doesn't have
to...
I had to add a javac just as well, to compile those.
Is this the correct approach?
<scalac scalacdebugging="true" srcdir="src"
destdir="bin">
<classpath refid="build.classpath" />
</scalac>
<javac srcdir="src" destdir="bin">
<classpath refid="build.classpath" />
</javac>
-----
Razvan Cojocaru,
Work: http://www.sigma-systems.com
Playground: http://wiki.homecloud.ca
Follow me: http://feeds.razie.com/RazvanTech RSS Feed ,
http://twitter.com/razie Twitter .
--
View this message in context:
http://old.nabble.com/scalac-and-javac-tp27525527p27525527.html
Sent from the Scala - User mailing list archive at Nabble.com.
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email