Building on Scala 2.9?

19 views
Skip to first unread message

Wille Faler

unread,
May 10, 2011, 6:44:06 AM5/10/11
to sca...@googlegroups.com
Hi,
Is there any work/investigation going into getting Scalate compiling/building/working with Scala 2.9 (current RC's)?

Regards
Wille

James Strachan

unread,
May 10, 2011, 6:53:26 AM5/10/11
to sca...@googlegroups.com

Not yet; wanna try it out? :)

Have you found the bytecode to be compatible so far?


--
James
-------
FuseSource
Email: ja...@fusesource.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Connect at CamelOne May 24-26
The Open Source Integration Conference
http://camelone.com/

Wille Faler

unread,
May 10, 2011, 7:06:41 AM5/10/11
to sca...@googlegroups.com
I saw some claims on the Scala user mailing list that it isn't, so re-compilation may be in order, though not sure how authoritative the sources where (could still be "very", but don't remember names).

The main issue I found with 2.9 was that of java primitives (and their equivalents: Int, Boolean, Long etc) return "java.lang.Object" on generified types: ParameterizedType detail is erased for these during reflection - so the reflection behavior has changed for primitives and types that wrap primitives in the JDK (java.lang.Integer et al are still fine though)..

The solution for this for me was basically to depend on scalap.jar and do some parser combinator magic on the scalap output (my simple solution for my context: https://github.com/wfaler/recursivity-commons/tree/master/src/main/scala/com/recursivity/commons/bean/scalap )

..though I'm not sure if this is an issue at all for Scalate?

I might give getting a Scalate build on 2.9 a spin in the next coming week if I find the time!

Wille Faler

unread,
May 13, 2011, 6:46:12 AM5/13/11
to sca...@googlegroups.com
Hi,
I haven't spent a massive amount on time on this, so I might not be understanding everything, but it seems everything compiles, but there are 271 test failures out of 463 tests in scalate-core.

I have updated Scala to 2.9.0 and ScalaTest to 1.4.1.

Most issues seem to arise VerifyError around the use of RichInt.
I haven't delved any deeper into it than the test stacktrace in sbt, but I'm going to go out on a limb here and guess that it's possibly down to the reflection detail that has been removed/erased for types derived from Java primitives in Scala 2.9.
Don't have much to back that up though, other than a cursory look at the stacktrace and my own previous teething issues with Scala 2.9, so could be wrong..

/ Wille

James Strachan

unread,
May 13, 2011, 6:58:01 AM5/13/11
to sca...@googlegroups.com
Thanks Wille!

Looks like Hiram took a stab at moving the maven build and all tests
passed fine!
http://ci.fusesource.com/hudson/view/Scalate/

Haven't tried the SBT build yet - lemme tinker...

Wille Faler

unread,
May 13, 2011, 7:03:22 AM5/13/11
to sca...@googlegroups.com
I have surpressed all memories of Maven after using SBT, so I might have missed a few steps in getting it set up, as I noticed the sbt build depends on Maven being run prior to it(?).

Your CI is behind username/password auth, but I'm encouraged to hear that it builds cleanly!

Any ETA on having 1.4.1 built against 2.9?

Wille Faler

unread,
May 13, 2011, 7:03:54 AM5/13/11
to sca...@googlegroups.com
should have been "..built against 2.9 available in maven repos"

James Strachan

unread,
May 13, 2011, 7:05:50 AM5/13/11
to sca...@googlegroups.com
Just running sbt build here (pushed changes) and seeing loads of green
so far - looking good!

Sorry about the login/pwd on the CI server - its all green though :)

Wille Faler

unread,
May 13, 2011, 7:12:17 AM5/13/11
to sca...@googlegroups.com
On 13 May 2011 12:05, James Strachan <ja...@fusesource.com> wrote:
Just running sbt build here (pushed changes) and seeing loads of green
so far - looking good!

Sorry about the login/pwd on the CI server - its all green though :)

Community version of "works on my machine"? ;)

James Strachan

unread,
May 13, 2011, 7:21:13 AM5/13/11
to sca...@googlegroups.com
On 13 May 2011 12:12, Wille Faler <wille...@gmail.com> wrote:
> On 13 May 2011 12:05, James Strachan <ja...@fusesource.com> wrote:
>>
>> Just running sbt build here (pushed changes) and seeing loads of green
>> so far - looking good!
>>
>> Sorry about the login/pwd on the CI server - its all green though :)
>
> Community version of "works on my machine"? ;)

LOL.

Or even "works on one of my randomly chosen machines" :)

Keith Irwin

unread,
May 14, 2011, 4:02:24 PM5/14/11
to sca...@googlegroups.com
I'm using SBT and the scalate support built in to scalatra. I updated by build.properties to 2.9.0 (using sbt 0.7.7) and can't get the scalate support:


I'm not exactly sure how all that's supposed to work (scalatra-scalate pulling in a scalate dependency), but thought I'd report it just in case it helps.

I think the above is the last issue I have for moving my little project over to 2.9.0.

Keith

Keith Irwin

unread,
May 14, 2011, 4:06:22 PM5/14/11
to Scalate
Oops. That was just one of the "tries." Here's the expected location:


[warn] ==== SonaType: tried
[warn]
https://oss.sonatype.org/content/repositories/snapshots/org/fusesource/scalate/scalate-core/1.5.0-SNAPSHOT/scalate-core-1.5.0-SNAPSHOT.pom
[warn] -- artifact org.fusesource.scalate#scalate-core;1.5.0-
SNAPSHOT!scalate-core.jar:
[warn]
https://oss.sonatype.org/content/repositories/snapshots/org/fusesource/scalate/scalate-core/1.5.0-SNAPSHOT/scalate-core-1.5.0-SNAPSHOT.jar


Looks like fusesource isn't there at all.

For what it's worth.

Keith

Keith Irwin

unread,
May 14, 2011, 4:42:06 PM5/14/11
to sca...@googlegroups.com
Hm. Working now! Guess I caught things "in progress."

K
Reply all
Reply to author
Forward
0 new messages