Opened 6 years ago

Closed 6 years ago

#43124 closed submission (fixed)

New port: scala2.11

Reported by: msa@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: blair (Blair Zajac)
Port: scala2.11


Attached is a Portfile and accessory (files/scala2.11) to create a port for the scala 2.11 series of releases, beginning with 2.11.0-RC3. This port mostly conforms to the conventions of the scala 2.10 port and its pre-release antecedents, with one major exception.

Scala 2.11 begins a modularization project which splits off several parts of the main distribution into accessory jar files. These jar files are included in the main distribution tarball, however they complicate the classpath. In the Scala 2.10 Portfile, symlinks to the Scala distribution jar files are placed in /opt/local/share/java. Because of the increased complexity introduced by the modularity of the scala 2.11 distribution, this Portfile discontinues this practice. Modularity of the Scala distribution is an ongoing effort, and it's not unreasonable to assume that future releases of Scala will have even more complex classpaths. Given that this change in convention is made in a major release, there is no impact to scala 2.10 installations. Scala 2.10 macports users which use the scala library symlinks in /opt/local/share/java can find the scala jar files in /opt/local/share/scala-2.11/lib instead.

Attachments (2)

Portfile (2.8 KB) - added by msa@… 6 years ago.
scala2.11 (142 bytes) - added by msa@… 6 years ago.

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by msa@…

Attachment: Portfile added

Changed 6 years ago by msa@…

Attachment: scala2.11 added

comment:1 Changed 6 years ago by ryandesign (Ryan Schmidt)

Cc: blair@… added
Port: scala2.11 added
Summary: New port: scala 2.11New port: scala2.11

comment:2 Changed 6 years ago by blair (Blair Zajac)

At least in Scala 2.11.x, it looks like the jars may change names for each minor version, so if MacPorts provides a stable path to a jar that can be used in scripts, then that's a good thing. I've needed the symlinks for build systems that are not ant, mvn or sbt so it's nice to have a short path that doesn't have to dive into the layout that the Scala tarball explodes into.

I don't think it's that hard to keep the Portfile to maintain the symlinks, maybe the for loop is changed to be a loop of strings of the form "akka-actor_2.11.0-RC3-2.3.0.jar:akka-actor_2.11.jar" that is split on : to generate the name for $prefix/share/java.

Let me know your thoughts.


comment:3 Changed 6 years ago by msa@…

Hi Blair,

Which scala jar files do your scripts use?

I see two other alternatives to maintaining individual file symlinks in the Portfile:

  1. Create a symlink from share/java/scala-2.11 to share/scala-2.11/lib. Client scripts use a strategy described in to create a classpath from all jar files in share/java/scala-2.11.
  1. Like (1), but don't create the symlink. Clients pull jar files from share/scala-2.x/lib. This strategy has the advantage that compatible scripts can be easily adapted to use either scala 2.10 or 2.11 (or 2.9, presumably, though I haven't checked its layout).


comment:4 Changed 6 years ago by blair (Blair Zajac)

Resolution: fixed
Status: newclosed

I punted on the symlink issue, can revisit it later if it is ever needed. Committed in r118698 using RC4.

Note: See TracTickets for help on using tickets.