- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Trying to use 2.8.0 with ant, not succeeding
Fri, 2009-04-17, 00:15
I'm trying to build a combined Java/Scala project using ant. The
existing build.xml references the two jar files scala-
compiler-2.7.2.jar and scala-library-2.7.2.jar, and it builds
successfully.
It also works when I substitute
scala-compiler-2.7.4RC1.jar
and
scala-library-2.7.4RC1.jar
(and changes to the error messages generated confirm that the change
has an effect).
However, when I substitute scala-compiler.2.8.0.jar
and scala-library.2.8.0.jar, it fails fast, like so:
/Users/dr2chase/workspace/PFC/ProjectFortress/build.xml:192: The
following
error occurred while executing this line:
jar:file:/Users/dr2chase/workspace/PFC/ProjectFortress/third_party/scala
/scala-compiler-2.8.0.jar!/scala/tools/ant/antlib.xml:5: taskdef A class
needed by class scala.tools.ant.FastScalac cannot be found:
scala/ScalaObject
Since I the only thing I am changing is the version numbers of the jar
files I have referenced, it seems that conditions for running Scala
within ant have changed. I googled and searched the Scala site and
GMane for any occurrences of the error message, and did not see them,
nor did I see any special mention of rules for ant and 2.8.0, so I am
a little stumped. My first assumption is pilot error, except that I
am using the new release in exactly the same way as the old releases.
Platform info:
MacOS, 10.5.6, Java 1.6, ant 1.7.1
Scala-relevant bits of build.xml:
----------------------
...
...
...
...
----------------------
any help is much appreciated. I am trying to sort out a bug that
appears in Eclipse, to figure out whether it is in the plugin or in
the compiler.
Fri, 2009-04-17, 02:07
#2
Re: Trying to use 2.8.0 with ant, not succeeding
<property name="scala-library.jar"
value="${basedir}/third_party/scala/scala.library-2.8.0.jar"/>
Remove the . from scala-library and you should be ok.
Cheers,
Josh
On Thu, Apr 16, 2009 at 7:53 PM, Paul Phillips <paulp@improving.org> wrote:
Did you read my comment in http://lampsvn.epfl.ch/trac/scala/ticket/1891
before I closed that ticket? Your email here does not appear to reflect
any cognizance of it, except the suggestion to email scala-tools rather
than opening a ticket. The diagnosis given there is still probably
right, and the information I said was missing is still missing.
Your assessment regarding which parts of build.xml are relevant is
incomplete. Rather than entering the people who might help you into a
guessing game about what's in the rest of it, please post a link to the
whole thing.
--
Paul Phillips | One way is to make it so simple that there are
Moral Alien | obviously no deficiencies. And the other way is to make
Empiricist | it so complicated that there are no obvious deficiencies.
slap pi uphill! | -- Hoare
Fri, 2009-04-17, 03:07
#3
Re: Trying to use 2.8.0 with ant, not succeeding
I read your comment, but what was baffling was how, given no other
source of scala, it worked with the 2.7.2/2.7.4RC1 substitution, but
not with the 2.8.0 substitution.
I believe I found the problem, which was in another file altogether
(another build.xml) which was also setting up these properties. That
is, "given no other source of Scala", was an incorrect assumption. I
am not entirely clear on what was being presented to the Scala
compiler, but my guess is that 2.7.2/4 could get by with their
libraries mixed up, but 2.7/2.8 would not.
I found the other file, and felt quite stupid upon discovering it, and
will be moving at this end to get rid of it.
HOWEVER, happily, I am now able to run 2.8.0 from the command line,
and can now sort out plugin versus compiler issues. I've isolated the
different behavior to the command line, away from the plugin, and now
need to figure out if this is a newly diagnosed bug in our Scala code,
or a regression in the compiler.
Thanks for your patient, cheerful, and gracious help,
David Chase
On 2009-04-16, at 7:53 PM, Paul Phillips wrote:
> Did you read my comment in http://lampsvn.epfl.ch/trac/scala/ticket/1891
> before I closed that ticket? Your email here does not appear to
> reflect
> any cognizance of it, except the suggestion to email scala-tools
> rather
> than opening a ticket. The diagnosis given there is still probably
> right, and the information I said was missing is still missing.
>
> Your assessment regarding which parts of build.xml are relevant is
> incomplete. Rather than entering the people who might help you into a
> guessing game about what's in the rest of it, please post a link to
> the
> whole thing.
>
Did you read my comment in http://lampsvn.epfl.ch/trac/scala/ticket/1891
before I closed that ticket? Your email here does not appear to reflect
any cognizance of it, except the suggestion to email scala-tools rather
than opening a ticket. The diagnosis given there is still probably
right, and the information I said was missing is still missing.
Your assessment regarding which parts of build.xml are relevant is
incomplete. Rather than entering the people who might help you into a
guessing game about what's in the rest of it, please post a link to the
whole thing.