New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala 2.11.3 issue #193

Closed
seratch opened this Issue Oct 12, 2014 · 6 comments

Comments

Projects
None yet
1 participant
@seratch
Copy link
Member

seratch commented Oct 12, 2014

I just realized that some features of Skinny doesn't work on Scala 2.11.3.

2014-10-12 12:30:50,627 ERROR [qtp1562951302-64] controller.Controllers$members$ org.scalatra.ScalatraParams.filterImpl(Lscala/Function1;Z)Ljava/lang/Object;
java.lang.AbstractMethodError: org.scalatra.ScalatraParams.filterImpl(Lscala/Function1;Z)Ljava/lang/Object;
    at scala.collection.TraversableLike$class.filter(TraversableLike.scala:270) ~[scala-library-2.11.3.jar:na]
    at org.scalatra.ScalatraParams.filter(ScalatraContext.scala:9) ~[scalatra_2.11-2.3.0.jar:2.3.0]
    at skinny.StrongParameters.permit(StrongParameters.scala:18) ~[skinny-common_2.11-1.3.3.jar:1.3.3]
    at skinny.controller.Params.permit(Params.scala:46) ~[skinny-framework_2.11-1.3.3.jar:1.3.3]
    at skinny.controller.SkinnyResourceActions$$anonfun$createResource$1.apply(SkinnyResourceActions.scala:139) ~[skinny-framework_2.11-1.3.3.jar:1.3.3]
    at skinny.controller.SkinnyControllerBase$class.withFormat(SkinnyControllerBase.scala:108) ~[skinny-framework_2.11-1.3.3.jar:1.3.3]
    at skinny.controller.SkinnyController.withFormat(SkinnyController.scala:6) [skinny-framework_2.11-1.3.3.jar:1.3.3]
    at skinny.controller.SkinnyResourceActions$class.createResource(SkinnyResourceActions.scala:135) ~[skinny-framework_2.11-1.3.3.jar:1.3.3]
    at controller.MembersController.createResource(MembersController.scala:8) ~[classes/:na]

@seratch seratch added the bug label Oct 12, 2014

@seratch seratch self-assigned this Oct 12, 2014

@seratch

This comment has been minimized.

Copy link
Member Author

seratch commented Oct 12, 2014

I just tried Scalatra project with Scala 2.11.3. It works fine.

git clone https://github.com/scalatra/scalatra.git
cd scalatra
$ git diff
diff --git a/project/build.properties b/project/build.properties
index 8ac605a..be6c454 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -1 +1 @@
-sbt.version=0.13.2
+sbt.version=0.13.5
diff --git a/project/build.scala b/project/build.scala
index 2333afd..a5125f5 100644
--- a/project/build.scala
+++ b/project/build.scala
@@ -13,11 +13,11 @@ import com.typesafe.tools.mima.plugin.MimaKeys.{binaryIssueFilters, previousArti
 object ScalatraBuild extends Build {
   import Dependencies._

-  lazy val scalatraSettings = Defaults.defaultSettings ++
+  lazy val scalatraSettings =
     mimaDefaultSettings ++
     ls.Plugin.lsSettings ++ Seq(
     organization := "org.scalatra",
-    crossScalaVersions := Seq("2.11.1", "2.10.4"),
+    crossScalaVersions := Seq("2.11.3", "2.10.4"),
     scalaVersion <<= (crossScalaVersions) { versions => versions.head },
     scalacOptions ++= Seq("-target:jvm-1.7", "-unchecked", "-deprecation", "-Yinline-warnings", "-Xcheckinit", "-encoding", "utf8", "-feature"),
     scalacOptions ++= Seq("-language:higherKinds", "-language:postfixOps", "-language:implicitConversions", "-language:reflectiveCalls", "-language:existentials"),
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 286c3c6..986ccf2 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -5,16 +5,16 @@ resolvers ++= Seq(
   "coda" at "http://repo.codahale.com"
 )

-addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.4")
+addSbtPlugin("org.scalatra.sbt" % "scalatra-sbt" % "0.3.5")

 addSbtPlugin("me.lessis" % "ls-sbt" % "0.1.3")

-addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.1")
+addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")

 addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.6")

-addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.3")
+addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.6")

-addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.1")
+addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3")

-addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4")
\ No newline at end of file
+addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4")

REPL

$ sbt scalatra/console
[info] Loading project definition from /Users/seratch/tmp/scalatra/project
[info] Set current project to scalatra-project (in build file:/Users/seratch/tmp/scalatra/)
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.11.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import org.scalatra._
import org.scalatra._

scala> val m = new ScalatraParams(Map("aaa" -> Seq("123")))
m: org.scalatra.ScalatraParams = Map(aaa -> 123)

scala> m.filter { case (k, v) => v == "1234" }
res0: scala.collection.immutable.Map[String,String] = Map()
@seratch

This comment has been minimized.

Copy link
Member Author

seratch commented Oct 12, 2014

I just tried publishLocal scalatra 2.3.1-SNAPSHOT with Scala 2.11.3. Everything works fine.

@seratch

This comment has been minimized.

Copy link
Member Author

seratch commented Oct 12, 2014

Skinny application on Scala 2.11.0 works fine when using scalatra 2.3.1-SNAPSHOT built with Scala 2.11.3.

@seratch

This comment has been minimized.

Copy link
Member Author

seratch commented Oct 12, 2014

I just created an issue on the scala-lang JIRA. https://issues.scala-lang.org/browse/SI-8899

@seratch

This comment has been minimized.

Copy link
Member Author

seratch commented Oct 14, 2014

@seratch

This comment has been minimized.

Copy link
Member Author

seratch commented Nov 5, 2014

Scala 2.11.4 is out. Avoid using 2.11.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment