Geraint | 16 Mar 16:41 2012
Picon

Building Scala sources and running testsuite using partest

I'm trying to run the testsuite supplied in scala-2.9.1-1-sources.tgz.

Can anybody point me at the documentation for how to build and test?
All I've been able to find so far are snippets in various forum
responses.

I worked out that I have to build the sources first, using ant. So I
downloaded ant 1.8.3. I also need to build under a version Java. So I
downloaded Java. In fact, I downloaded 2 versions of Java - version 6
and version 7 - from Oracle.

Building under Java 6 (and ant 1.8.3) works fine, and I'm able to run
the tests using partest (some of which fail).

However, buyilding under Java 7 fails. One or two comments suggested
that Scala doesn't support Java 7 yet. Is this right? Where is this
stated on the Scala website?

In addition to the errors that "ant build" throws out, I get a stack
trace right at the end.

BUILD FAILED
/apps/scala/scala-2.9.1-1-sources.oracle.java.7/build.xml:516:
java.lang.RuntimeException: Compilation failed because of an internal
compiler error; see the error output for details.
        at scala.sys.package$.error(package.scala:27)
        at scala.tools.ant.sabbus.ScalacFork.execute(ScalacFork.scala:
117)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
(Continue reading)

Eugene Burmako | 16 Mar 22:21 2012
Picon
Picon

Re: Building Scala sources and running testsuite using partest

Yeah, currently you cannot build master against Java 1.7 because of incompatible changes in Swing. We used to have a special branch for these purposes, but I'm not sure about its current status.

Also you've only provided the "Compilation failed because of an internal compiler error; see the error output for details" fragment of ant's output. The interesting part gets printed above this error message, and it usually contains real compilation errors that failed the build (I bet they were Swing-related). Apparently, ant or our ant plugin decide to bury useful error messages under this "internal compiler error" stuff. Not very intuitive.

On 16 March 2012 16:41, Geraint <geraintwjones <at> gmail.com> wrote:
I'm trying to run the testsuite supplied in scala-2.9.1-1-sources.tgz.

Can anybody point me at the documentation for how to build and test?
All I've been able to find so far are snippets in various forum
responses.

I worked out that I have to build the sources first, using ant. So I
downloaded ant 1.8.3. I also need to build under a version Java. So I
downloaded Java. In fact, I downloaded 2 versions of Java - version 6
and version 7 - from Oracle.

Building under Java 6 (and ant 1.8.3) works fine, and I'm able to run
the tests using partest (some of which fail).

However, buyilding under Java 7 fails. One or two comments suggested
that Scala doesn't support Java 7 yet. Is this right? Where is this
stated on the Scala website?

In addition to the errors that "ant build" throws out, I get a stack
trace right at the end.

BUILD FAILED
/apps/scala/scala-2.9.1-1-sources.oracle.java.7/build.xml:516:
java.lang.RuntimeException: Compilation failed because of an internal
compiler error; see the error output for details.
       at scala.sys.package$.error(package.scala:27)
       at scala.tools.ant.sabbus.ScalacFork.execute(ScalacFork.scala:
117)
       at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
       at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
       at java.lang.reflect.Method.invoke(Method.java:601)
       at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:
106)
       at org.apache.tools.ant.Task.perform(Task.java:348)
       at org.apache.tools.ant.Target.execute(Target.java:392)
       at org.apache.tools.ant.Target.performTasks(Target.java:413)
       at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
       at org.apache.tools.ant.Project.executeTarget(Project.java:
1368)
       at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:
41)
       at org.apache.tools.ant.Project.executeTargets(Project.java:
1251)
       at org.apache.tools.ant.Main.runBuild(Main.java:811)
       at org.apache.tools.ant.Main.startAnt(Main.java:217)
       at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
       at org.apache.tools.ant.launch.Launcher.main(Launcher.java:
109)

Total time: 20 minutes 4 seconds

Can anybody shed any light on this?

Thanks.

Paul Phillips | 16 Mar 23:07 2012

Re: Building Scala sources and running testsuite using partest

On Fri, Mar 16, 2012 at 2:21 PM, Eugene Burmako <eugene.burmako <at> epfl.ch> wrote:
> Yeah, currently you cannot build master against Java 1.7 because of
> incompatible changes in Swing. We used to have a special branch for these
> purposes, but I'm not sure about its current status.

It's still there and working.  All the changes are in swing, which
otherwise hasn't changed, so it's stable.

https://github.com/scala/scala/branches/java7


Gmane