Scala 2.10 vs 2.9 incompatibilities

What are Scala 2.10 vs 2.9 incompatibilities and how to deal with them?

Especially the main libraries, but any problems with popular libraries can be interesting.

Links to white papers are welcome.

+4
source share
3 answers

Not sure if error counting, howerer there is a problem with the output type and existential types , which is now fixed (but the fix has not yet been installed, so the problem remains in the current version 2.10.0)

This is SI-5330 . In the description of the problem (and in various comments) there are examples of code that was used to compile in scala 2.9 and is now not compiled in 2.10.

+2
source

Found a couple of these:

  • Actors library by default - Akka

Migration to Akka:

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

Or turn on the old one. For instance. using maven:

<dependency> <groupId>org.scala-lang</groupId> <artifactId>scala-actors</artifactId> <version>2.10.0</version> </dependency> 
  • Extension of class classes leads to addition error

Do not inherit case classes. Use the extractor pattern if you used case classes to match:

http://www.scala-lang.org/node/112

  • Several deprecated methods have been removed from List , including: - , -- , first , sort ...

Cm:

http://www.scala-lang.org/api/current/index.html#scala.collection.immutable.List

http://www.scala-lang.org/api/2.9.2/index.html#scala.collection.immutable.List

+1
source

I think that by and large they are not source code, incompatible. There are some differences, especially those related to existences and pattern matching - some due to new errors on 2.10.0, some due to old errors on 2.9.2 that have been fixed.

Of course, many obsolete things have been removed, but this should be taken for granted.

+1
source

All Articles