Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which version of scala should I release my library to?

When I was releasing for scala 2.9.x, I simply had this line in my build.sbt:

crossScalaVersions := Seq("2.9.0", "2.9.0-1", "2.9.1", "2.9.1-1", "2.9.2")

But now, scala 2.10 is out, and I'm confused. My intuition was that I should have something like this:

crossScalaVersions := Seq("2.10.0")

But I noticed, that when I have scala version set to 2.10.0, sbt searches for artifacts ending with 2.10, not 2.10.0. What's going on here? What version should I use?

EDIT: Also, if I do publish-local, the artifact also ends up being suffixed by "_2.10", instead of "_2.10.0".

like image 279
Rogach Avatar asked Dec 22 '12 15:12

Rogach


People also ask

Can Scala 3 use Scala 2 libraries?

Scala 3 is backwards compatible with Scala 2, except for a few deprecated features that are being dropped. The Scala standard library already cross-compiles between the two versions.

What is the difference between Scala 2 and 3?

In Scala 2, extension methods had to be encoded using implicit conversions or implicit classes. In contrast, in Scala 3 extension methods are now directly built into the language, leading to better error messages and improved type inference.

Is Scala 2.12 backwards compatible?

So Scala 2.11 => Scala 2.12 is a major release. It's not a minor release! Scala major releases are not backwards compatible. Java goes to extreme lengths to maintain backwards compatibility, so Java code that was built with Java 8 can be run with Java 14.

When was Scala 3 release?

The production release of Scala 3 was introduced May 14, following a release candidate stage that began on February 17.


1 Answers

The "Scala 2.10.0 staged" thread says

You can indeed simply cross version against 2.10.

like image 144
Alexey Romanov Avatar answered Oct 25 '22 22:10

Alexey Romanov