Domanda

I am having a little trouble in using Scalaz7 together with Play. Right now I am using the standard Play distribution with Scala 2.9.1 and scalaz-core 7.0-SNAPSHOT. This lives in the repository http://repo.typesafe.com/typesafe/repo/ which does not seem to be official. I am not sure about this, but there are already http://repo.typesafe.com/typesafe/snaphots/ and http://repo.typesafe.com/typesafe/releases/ and I do not know whether repo is officially endorsed and mantained. It is up now, but a few days ago it seemed to have vanished.

On the snapshots repository I see scalaz-core 7.0-M3, but only for Scala 2.9.2. I am not even sure which one between 7.0-SNAPSHOT and 7.0-M3 is the most updated version of scalaz, although most blog posts and docs I find seem to refer to version 7.0-M3.

So, given that I am developing a Play application which makes use of Scalaz, and it seems too much trouble to go back to scalaz 6 now that I have taken some time to learn scalaz 7,

what is the right way to use Scalaz 7 inside play? Should I go for the unofficial repo, as I am doing right now, or upgrade the project to Scala 2.9.2? Is Play! already supporting 2.9.2? If not, how should I upgrade?

È stato utile?

Soluzione

Because play2 is using scala 2.9.1, by default sbt tries to get 2.9.1 scalaz library jars. However because scalaz7 has only been released for 2.9.2 you need to do the following to force it to download the 2.9.2 version. Scala 2.9.1 and 2.9.2 are compatible enough for this to work.

"org.scalaz" % "scalaz-core_2.9.2" % "7.0.0-M4" 
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top