FS#33383 - [scala] Scala 2.10 should be based on scala-dist

Attached to Project: Community Packages
Opened by Philipp Glaser (philg) - Sunday, 13 January 2013, 19:33 GMT
Last edited by Balló György (City-busz) - Wednesday, 25 December 2013, 09:44 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

Current version of scala package is based on sources for compiler developers (at least it seems so). Packages delivered to users are created by build scripts in scala-dist project: https://github.com/scala/scala-dist/

As a result, there are differences between our Scala and official Scala distribution prepared for other operating systems (Windows, Mac) or other Linux distributions (rpm or deb based).

Scala 2.10 should contain 3 extra libraries:

- Akka Actors 2.1.0: akka-actors.jar ( http://akka.io/ download from https://oss.sonatype.org/content/repositories/releases/com/typesafe/akka/akka-actor_2.10/2.1.0/akka-actor_2.10-2.1.0.jar )
- Scala Actors Migration 1.0.0: scala-actors-migration.jar ( https://github.com/scala/actors-migration download from https://oss.sonatype.org/content/repositories/releases/org/scala-lang/scala-actors-migration_2.10/1.0.0/scala-actors-migration_2.10-1.0.0.jar )
- Typesafe config 1.0.0: typesafe-config.jar ( https://github.com/typesafehub/config download from https://oss.sonatype.org/content/repositories/releases/com/typesafe/config/1.0.0/config-1.0.0.jar )

And NOT include scalacheck.jar (version used for compiler development?):

- https://groups.google.com/forum/#!topic/scala-internals/gqDXK6tofGc
- https://issues.scala-lang.org/browse/SI-6121 (marked as critical bug)
This task depends upon

Closed by  Balló György (City-busz)
Wednesday, 25 December 2013, 09:44 GMT
Reason for closing:  Fixed
Additional comments about closing:  scala-2.10.3-1
Comment by Sergej Pupykin (sergej) - Wednesday, 16 January 2013, 10:16 GMT
It is separate project
http://akka.io/
http://typesafe.com/stack/downloads/akka

If you find something missing (not compiled into package) from scala-source-2.10.0.tgz please let me know.
Comment by Andrzej Giniewicz (Giniu) - Sunday, 03 February 2013, 15:02 GMT
This is no longer a separate project, it's in process of being merged and that's why it's included in source. Check:

http://docs.scala-lang.org/overviews/core/actors-migration-guide.html

It says:

"""In Scala 2.10.0 actors reside inside the Scala distribution as a separate jar ( scala-actors.jar ), and the their interface is deprecated. The distribution also includes Akka actors in the akka-actor.jar. The AMK resides both in the Scala actors and in the akka-actor.jar. Future major releases of Scala will not contain Scala actors and the AMK."""

It means, that our package includes only deprecated version of library instead of one that is shipped upstream as part of official distribution - and we will never ship migration toolkit, because when akka will be merged there will be no AMK. If we assume that it should still be separate project, then I blieve scala package should depend on akka package or provide it anyway.

It could be probably solved easily by providing official built distribution instead of building our own? If we consider scala to be a java package, our wiki at https://wiki.archlinux.org/index.php/Java_Package_Guidelines says we do not have to compile java packages as it does not give us much. Is there any reason why you decided to build it from source? I haven't checked it, so I might not know.
Comment by Andrzej Giniewicz (Giniu) - Saturday, 02 March 2013, 10:37 GMT
To be more exact, those are missing libraries that are bundled with Scala binary distribution:

Akka Actors 2.1.0: akka-actors.jar ( http://akka.io/ )
Scala Actors Migration 1.0.0: scala-actors-migration.jar ( https://github.com/scala/actors-migration )
Typesafe config 1.0.0: typesafe-config.jar ( https://github.com/typesafehub/config )

And we have one extra file, which gets removed from official distribution: scalacheck.jar

All this is defined in file https://github.com/scala/scala-dist/blob/master/project/scaladistrofinder.scala function "cleanScalaDistro" - it does 3 things:

- dos2unix on *.bat files (not applicable for us)
- remove scalacheck.jar
- download those 3 extra .jar files from Maven repository

Now goes the question - what do we consider to be "upstream" in this case? Officially published sources, or officially published binaries?

And one more thing - reasons why they remove scalacheck.jar:

- https://groups.google.com/forum/#!topic/scala-internals/gqDXK6tofGc
- https://issues.scala-lang.org/browse/SI-6121 (marked as critical bug)

Still, I don't know why they build and install it as part of process, probably to have compatible/same version of ScalaCheck for checking compiler during its development. This makes me think that we should conform to binary version, not source version. Just my though though, what do you think?

I adjusted ticket description to mirror new findings about why our scala differs from distributed scala.
Comment by Andrzej Giniewicz (Giniu) - Monday, 04 March 2013, 13:47 GMT
As a reference I've created 3 packages that install missing jar files:

https://aur.archlinux.org/packages/scala-actors-migration/
https://aur.archlinux.org/packages/scala-akka-actors/
https://aur.archlinux.org/packages/scala-typesafe-config/

this can serve as temporary solution, but it does not solve issue with scalacheck.jar that should be removed.
Comment by Sergej Pupykin (sergej) - Monday, 11 March 2013, 10:41 GMT
thanks, probably I'll move them to community.
Comment by Balló György (City-busz) - Saturday, 14 September 2013, 20:56 GMT
@Sergej, any decision? I think it would be fine to use the prebuilt jar files, as we don't get too much optimization by building them from sources.
Comment by Sergej Pupykin (sergej) - Monday, 16 September 2013, 19:10 GMT
scala 2.10 cannot be build using java7. Waiting for 2.11 wich should be compatible with java7. Maybe it is ok to use binaries.
Comment by Balló György (City-busz) - Wednesday, 18 December 2013, 00:26 GMT
I attached a PKGBUILD for scala 2.10.3, which uses the prebuilt jar files released by upstream.

@Sergej, would you accept this PKGBUILD?
Comment by Balló György (City-busz) - Saturday, 21 December 2013, 20:45 GMT
Now I released the new scala-2.10.3-1 package, it's available in the [community-testing] repository. Please let me know if I did something wrong.

Loading...