- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Using development versions of Scala day-to-day
Tue, 2012-01-24, 09:27
Hi folks,
I'm presently working on a project that requires a 2.10 build of
Scala, due to a bug with overriding dependent method types in 2.9 that
has since been fixed in trunk.
I've been looking around for practical information about how to
actually do this, and I've come up short. I can set my Scala version
to 2.10-SNAPSHOT or 2.10-M1 in my build.sbt file, and with a little
tweak to sbt's compiler interface source (adding a .toString at one
point) everything works.
The interesting problem is then, how do I use other libraries, in
particular ScalaCheck? I know that binary compatibility is not
guaranteed across major versions of the compiler, but my guess is that
the source should work. Is there a way to get up-to-date compiled
versions of libraries? Or perhaps to have them compiled along with my
project without having to copy them to my own source tree?
I appreciate any pointers!
/David Christiansen
Tue, 2012-01-24, 11:31
#2
Re: Using development versions of Scala day-to-day
Hi Francois,
> As far as I know, there is no public artifact published by any library
> developers for SNAPSHOT version of trunk.
> One of the point of 2.10-M1 (again, AFAIK) was to allow library
> developers to build port/build artifact compatible with that Scala
> milestone so that regression and compatibilities issue may be found
> early. But I don't know if it was done.
Thank you for the explanation - I'm somewhat new to the JVM world, and
I hadn't quite wrapped my head around the relationship between Ivy,
Maven, SBT, and library repositories. I think I have a better idea now
of how it works.
> So, I were you, in order of preference, I would try to:
>
> * not use 2.10/trunk. If you depend upon other libraries, as you seems
> to be, that's clearly not a path of simplicity. So, did you check if
> your bug was corrected in 2.9.2-SNAPSHOT ? Perhaps it would be simplier
Unfortunately, it's not. The issue is SI-5033, which as far as I can
tell is present in 2.9.2-SNAPSHOT.
> * assuming you don't have any other choice than using 2.10, at least
> use 2.10-M1. Then, you will have to port all your dependencies to
> that version of Scala - if you are lucky, projects will be source
> compatible, but who knows. So, the simpler is perhaps to try to work
> with each project leader to port there code, and perhaps to speak
> with Josh Suereth about a Scala fresh revival, now that TypeSafe
> produce milestone - that would be great ;)
All I had to change for Scalacheck was the build script to add another
version, now that I've figured out how publish-local works. I sent
them a pull request :-) For now, Scalacheck is my only missing
dependency.
> Cheers, and good luck !
Thanks! I seem to be on track again.
/David
Tue, 2012-01-24, 11:31
#3
Re: Using development versions of Scala day-to-day
Hi David,
the best thing would be to ask if your bug fix could be included in the next 2.9.x update. Until this happens you could also apply the path to the 2.9.x compiler yourself and use that instead of moving to 2.10, although I'm currently not sure if 2.10 or 2.9.2 will happen first.
Bye,
Simon
the best thing would be to ask if your bug fix could be included in the next 2.9.x update. Until this happens you could also apply the path to the 2.9.x compiler yourself and use that instead of moving to 2.10, although I'm currently not sure if 2.10 or 2.9.2 will happen first.
Bye,
Simon
Tue, 2012-01-24, 14:11
#4
Re: Using development versions of Scala day-to-day
On Tue, Jan 24, 2012 at 06:26, David Christiansen
wrote:
> Hi folks,
>
> I'm presently working on a project that requires a 2.10 build of
> Scala, due to a bug with overriding dependent method types in 2.9 that
> has since been fixed in trunk.
>
> I've been looking around for practical information about how to
> actually do this, and I've come up short. I can set my Scala version
> to 2.10-SNAPSHOT or 2.10-M1 in my build.sbt file, and with a little
> tweak to sbt's compiler interface source (adding a .toString at one
> point) everything works.
>
> The interesting problem is then, how do I use other libraries, in
> particular ScalaCheck? I know that binary compatibility is not
> guaranteed across major versions of the compiler, but my guess is that
> the source should work. Is there a way to get up-to-date compiled
> versions of libraries? Or perhaps to have them compiled along with my
> project without having to copy them to my own source tree?
The first milestone of 2.10 is incompatible with the current latest
version of SBT. Until a new SBT release supporting it comes out, few
libraries will be available.
Tue, 2012-01-24, 15:01
#5
Re: Using development versions of Scala day-to-day
Hi Daniel,
> The first milestone of 2.10 is incompatible with the current latest
> version of SBT. Until a new SBT release supporting it comes out, few
> libraries will be available.
I was able to fix it pretty easily by updating the line in the SBT jar
that it complains about to have an explicit call to toString. So there
is a workaround that seems to work fine.
/David
Tue, 2012-01-24, 16:51
#6
Re: Using development versions of Scala day-to-day
Hi Simon,
> the best thing would be to ask if your bug fix could be included in the
> next 2.9.x update. Until this happens you could also apply the path to the
> 2.9.x compiler yourself and use that instead of moving to 2.10, although
> I'm currently not sure if 2.10 or 2.9.2 will happen first.
Good advice. I see that you've already requested it on the issue
tracker for me - thanks!
In the meantime, I've got Scalacheck working on 2.10.0-M1, so my
practical needs for the moment are met.
Is there anywhere else I should post a request for bugfix inclusion?
/David
As far as I know, there is no public artifact published by any library developers for SNAPSHOT version of trunk.
One of the point of 2.10-M1 (again, AFAIK) was to allow library developers to build port/build artifact compatible with that Scala milestone so that regression and compatibilities issue may be found early. But I don't know if it was done.
So, I were you, in order of preference, I would try to:
Cheers, and good luck !