julienrf / play-jsmessages

Library to compute localized messages of your Play application on client side

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation fail with Play 2.1.5 using sbt

gigiigig opened this issue · comments

Hi,
it seems that the 1.5.0 version breaks compilation with Play 2.1.5 using sbt command instead of play, looking at code in build.sbt there is :

libraryDependencies += "play" %% "play" % "2.1.0"

Could be that the problem?

Luigi

Yes, that is surely the problem. In the meanwhile I re-published the 1.5.0 release using a dynamic ivy pattern: [2.1.0,). Please clear your ivy cache and re-try.

I tried to clear cache and update but have still the same error

Hi, I tried with an empty project with the following project/plugins.sbt:

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("play" % "sbt-plugin" % "2.1.5")

The following project/Build.scala:

import sbt._
import Keys._
import play.Project._

object AppBuild extends Build {
  val main = play.Project("myapp", "1.0").settings(
    resolvers += "julienrf.github.com" at "http://julienrf.github.com/repo/",
    libraryDependencies += "com.github.julienrf" %% "play-jsmessages" % "1.5.0"
  )
}

(And I’m using sbt 0.12.2)

It works for me:

[/tmp/myapp]$ sbt update
Loading /Users/julienrichard-foy/sbt/bin/sbt-launch-lib.bash
[info] Loading project definition from /private/tmp/myapp/project
[info] Set current project to myapp (in build file:/private/tmp/myapp/)
[info] Updating {file:/private/tmp/myapp/}myapp...
[info] Done updating.
[success] Total time: 7 s, completed Nov 3, 2013 9:12:34 PM

Which error message do you get?

Problems are in routes file, i have 3 different errors:

/conf/routes:15: not found: value dynamicString
/conf/routes:15: too many arguments for method apply: (name: String, constraint: String)play.core.DynamicPart in object DynamicPart
/conf/routes:15: not found: value params

Those errors appear for every route with a dynamic part during compilation

It does not seem to be related with the jsmessages library. Did you run sbt clean?

I just tried to create a new basic Scala project with play 2.1.5 and added

  val main = play.Project(appName, appVersion, appDependencies).settings(
    resolvers += "julienrf.github.com" at "http://julienrf.github.com/repo/",
    libraryDependencies += "com.github.julienrf" %% "play-jsmessages" % "1.5.0"   
  )

and running sbt compile the result is:

[warn] Potentially incompatible versions of dependencies of {file:/Users/luigi/Workspace/IdeaWorkspace/test-js-message/}test-js-message:
[warn]    org.scala-lang: 2.10.0, 2.10.0-RC1
[info] Compiling 5 Scala sources and 1 Java source to /Users/luigi/Workspace/IdeaWorkspace/test-js-message/target/scala-2.10/classes...
[error] /Users/luigi/Workspace/IdeaWorkspace/test-js-message/conf/routes:9: too many arguments for method apply: (name: String, constraint: String)play.core.DynamicPart in object DynamicPart
[error] GET     /assets/*file               controllers.Assets.at(path="/public", file)
[error] /Users/luigi/Workspace/IdeaWorkspace/test-js-message/conf/routes:9: not found: value params
[error] GET     /assets/*file               controllers.Assets.at(path="/public", file)
[error] two errors found
[error] (compile:compile) Compilation failed
[error] Total time: 31 s, completed Nov 3, 2013 9:09:23 PM

Trying to change in js-messages plugin tag 1.5.0

libraryDependencies += "play" %% "play" % "2.1.5"

it compiles

It looks like an error in the compilation of the routes file. Did you run the clean sbt command?
Why are you using scala 2.10.0-RC1 ?

Yes of course i tried with clean, i'm not using Scala 2.10.0-RC1,
this error appears when i add js-messages to dependencies, i'm using Scala 2.10.0.

I can't figure out where does the problem come from…

On 3 nov. 2013, at 22:33, Luigi Antonini notifications@github.com wrote:

Yes of course i tried with clean, i'm not using Scala 2.10.0-RC1,
this error appears when i add js-messages to dependencies, i'm using Scala 2.10.0.


Reply to this email directly or view it on GitHub.

If you don't have this error with a clean project, probably there is a problem with my configuration

commented

I have the exact same problem.. how was this fixed?

js-messages plugin tag 1.5.0 doesn't work, update to js-messages plugin tag 1.5.1 to resolve routes file compilation error

Version 1.5.1 report error on running, update to 1.5.2 now working