Skip to content
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

error running example with sbt run: overloaded method value settings with alternatives. #207

Closed
cocodrino opened this issue May 16, 2015 · 4 comments

Comments

@cocodrino
Copy link

commented May 16, 2015

hi, I'm not sure if I'm doing this correctly, I'm trying to run the example project with sbt run but I get his

/build.sbt:40: error: overloaded method value settings with alternatives:
(ss: sbt.Def.Setting[]*)sbt.Project
=> Seq[sbt.Def.Setting[
]]
cannot be applied to (Seq[sbt.Def.Setting[_ >: String with sbt.Task[Seq[String]] with Seq[sbt.Resolver] with Seq[sbt.ModuleID] <: Object]])
.settings(buildSettings ++ baseSettings)
^
sbt.compiler.EvalException: Type error in expression
at sbt.compiler.Eval.checkError(Eval.scala:384)
at sbt.compiler.Eval.compileAndLoad(Eval.scala:183)
at sbt.compiler.Eval.evalCommon(Eval.scala:152)
at sbt.compiler.Eval.evalDefinitions(Eval.scala:122)
at sbt.EvaluateConfigurations$.evaluateDefinitions(EvaluateConfigurations.scala:271)
at sbt.EvaluateConfigurations$.evaluateSbtFile(EvaluateConfigurations.scala:109)
at sbt.Load$.sbt$Load$$loadSettingsFile$1(Load.scala:712)
at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:717)
at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:716)
at scala.collection.MapLike$class.getOrElse(MapLike.scala:128)
at scala.collection.AbstractMap.getOrElse(Map.scala:58)
at sbt.Load$.sbt$Load$$memoLoadSettingsFile$1(Load.scala:716)
at sbt.Load$$anonfun$loadFiles$1$2.apply(Load.scala:723)
at sbt.Load$$anonfun$loadFiles$1$2.apply(Load.scala:723)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at sbt.Load$.loadFiles$1(Load.scala:723)
at sbt.Load$.discoverProjects(Load.scala:734)
at sbt.Load$.discover$1(Load.scala:545)
at sbt.Load$.loadTransitive(Load.scala:574)
at sbt.Load$.loadProjects$1(Load.scala:442)
at sbt.Load$.loadUnit(Load.scala:446)
at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:91)
at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:90)
at sbt.BuildLoader.apply(BuildLoader.scala:140)
at sbt.Load$.loadAll(Load.scala:334)
at sbt.Load$.loadURI(Load.scala:289)
at sbt.Load$.load(Load.scala:285)
at sbt.Load$.load(Load.scala:276)
at sbt.Load$.apply(Load.scala:130)
at sbt.Load$.defaultLoad(Load.scala:36)
at sbt.BuiltinCommands$.doLoadProject(Main.scala:481)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$.process(Command.scala:92)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.State$$anon$1.process(State.scala:184)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.MainLoop$.next(MainLoop.scala:98)
at sbt.MainLoop$.run(MainLoop.scala:91)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
at sbt.Using.apply(Using.scala:24)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
at sbt.MainLoop$.runLogged(MainLoop.scala:24)
at sbt.StandardMain$.runManaged(Main.scala:53)
at sbt.xMain.run(Main.scala:28)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)
[error] sbt.compiler.EvalException: Type error in expression

how could I run it with sbt?..thanks...

@cacoco

This comment has been minimized.

Copy link
Member

commented May 18, 2015

You'll need to use the sbt file inside of the Finatra project (instead of your locally installed sbt).

To do so, clone the repository, cd into your cloned repository and run:

./sbt clean +test

Let us know if that works.

Thanks!

@cocodrino

This comment has been minimized.

Copy link
Author

commented May 24, 2015

Hi, thanks for reply but it's still a bit unclear to me, I'm trying to run the sbt with the sbt file in the main folder

yo at yo in ~/Downloads/proj/scalaPROJ/finatra on git:master x [22:35:37]

$ ./sbt
[info] Skipping download of sbt-launch.jar.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0
[info] Loading global plugins from /home/yo/.sbt/0.13/plugins
[info] Loading project definition from /home/yo/Downloads/proj/scalaPROJ/finatra/project
/home/yo/Downloads/proj/scalaPROJ/finatra/build.sbt:122: error: overloaded method value settings with alternatives:
(ss: sbt.Def.Setting[]*)sbt.Project
=> Seq[sbt.Def.Setting[
]]
cannot be applied to (Seq[sbt.Def.Setting[]])
.settings(baseSettings ++ buildSettings ++ publishSettings ++ unidocSettings)
^
/home/yo/Downloads/proj/scalaPROJ/finatra/build.sbt:145: error: overloaded method value settings with alternatives:
(ss: sbt.Def.Setting[
])sbt.Project
=> Seq[sbt.Def.Setting[
]]
cannot be applied to (Seq[sbt.Def.Setting[_ >: sbt.Task[Seq[String]] with Seq[sbt.Resolver] with Seq[sbt.ModuleID] with Seq[String] with String with scala.xml.Node => scala.xml.Node with scala.xml.NodeSeq with Option[java.net.URL] with Seq[(String, java.net.URL)] with Option[sbt.Resolver] with sbt.MavenRepository => Boolean with Boolean]])
.settings(injectBuildSettings)
^
/home/yo/Downloads/proj/scalaPROJ/finatra/build.sbt:166: error: overloaded method value settings with alternatives:
(ss: sbt.Def.Setting[])sbt.Project
=> Seq[sbt.Def.Setting[]]
cannot be applied to (Seq[sbt.Def.Setting[
>: sbt.Task[Seq[String]] with Seq[sbt.Resolver] with Seq[sbt.ModuleID] with Seq[String] with String with scala.xml.Node => scala.xml.Node with scala.xml.NodeSeq with Option[java.net.URL] with Seq[(String, java.net.URL)] with Option[sbt.Resolver] with sbt.MavenRepository => Boolean with Boolean]])
.settings(injectBuildSettings)
^
/home/yo/Downloads/proj/scalaPROJ/finatra/build.sbt:178: error: overloaded method value settings with alternatives:
(ss: sbt.Def.Setting[]*)sbt.Project
=> Seq[sbt.Def.Setting[
]]
cannot be applied to (Seq[sbt.Def.Setting[_ >: sbt.Task[Seq[String]] with Seq[sbt.Resolver] with Seq[sbt.ModuleID] with Seq[String] with String with scala.xml.Node => scala.xml.Node with scala.xml.NodeSeq with Option[java.net.URL] with Seq[(String, java.net.URL)] with Option[sbt.Resolver] with sbt.MavenRepository => Boolean with Boolean]])
.settings(injectBuildSettings)
^
/home/yo/Downloads/proj/scalaPROJ/finatra/build.sbt:189: error: overloaded method value settings with alternatives:
(ss: sbt.Def.Setting[]*)sbt.Project
=> Seq[sbt.Def.Setting[
]]
cannot be applied to (Seq[sbt.Def.Setting[_ >: sbt.Task[Seq[String]] with Seq[sbt.Resolver] with Seq[sbt.ModuleID] with Seq[String] with String with scala.xml.Node => scala.xml.Node with scala.xml.NodeSeq with Option[java.net.URL] with Seq[(String, java.net.URL)] with Option[sbt.Resolver] with sbt.MavenRepository => Boolean with Boolean]])
.settings(injectBuildSettings)
^
/home/yo/Downloads/proj/scalaPROJ/finatra/build.sbt:206: error: overloaded method value settings with alternatives:
(ss: sbt.Def.Setting[]*)sbt.Project
=> Seq[sbt.Def.Setting[
]]
cannot be applied to (Seq[sbt.Def.Setting[_ >: sbt.Task[Seq[String]] with Seq[sbt.Resolver] with Seq[sbt.ModuleID] with Seq[String] with String with scala.xml.Node => scala.xml.Node with scala.xml.NodeSeq with Option[java.net.URL] with Seq[(String, java.net.URL)] with Option[sbt.Resolver] with sbt.MavenRepository => Boolean with Boolean]])
.settings(injectBuildSettings)
^
/home/yo/Downloads/proj/scalaPROJ/finatra/build.sbt:237: error: overloaded method value settings with alternatives:
(ss: sbt.Def.Setting[]*)sbt.Project
=> Seq[sbt.Def.Setting[
]]
cannot be applied to (Seq[sbt.Def.Setting[_ >: sbt.Task[Seq[String]] with Seq[sbt.Resolver] with Seq[sbt.ModuleID] with Seq[String] with String with scala.xml.Node => scala.xml.Node with scala.xml.NodeSeq with Option[java.net.URL] with Seq[(String, java.net.URL)] with Option[sbt.Resolver] with sbt.MavenRepository => Boolean with Boolean]])
.settings(finatraBuildSettings)
^
sbt.compiler.EvalException: Type error in expression
at sbt.compiler.Eval.checkError(Eval.scala:384)
at sbt.compiler.Eval.compileAndLoad(Eval.scala:183)
at sbt.compiler.Eval.evalCommon(Eval.scala:152)
at sbt.compiler.Eval.evalDefinitions(Eval.scala:122)
at sbt.EvaluateConfigurations$.evaluateDefinitions(EvaluateConfigurations.scala:271)
at sbt.EvaluateConfigurations$.evaluateSbtFile(EvaluateConfigurations.scala:109)
at sbt.Load$.sbt$Load$$loadSettingsFile$1(Load.scala:712)
at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:717)
at sbt.Load$$anonfun$sbt$Load$$memoLoadSettingsFile$1$1.apply(Load.scala:716)
at scala.collection.MapLike$class.getOrElse(MapLike.scala:128)
at scala.collection.AbstractMap.getOrElse(Map.scala:58)
at sbt.Load$.sbt$Load$$memoLoadSettingsFile$1(Load.scala:716)
at sbt.Load$$anonfun$loadFiles$1$2.apply(Load.scala:723)
at sbt.Load$$anonfun$loadFiles$1$2.apply(Load.scala:723)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at sbt.Load$.loadFiles$1(Load.scala:723)
at sbt.Load$.discoverProjects(Load.scala:734)
at sbt.Load$.discover$1(Load.scala:545)
at sbt.Load$.loadTransitive(Load.scala:574)
at sbt.Load$.loadProjects$1(Load.scala:442)
at sbt.Load$.loadUnit(Load.scala:446)
at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:91)
at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:90)
at sbt.BuildLoader.apply(BuildLoader.scala:140)
at sbt.Load$.loadAll(Load.scala:334)
at sbt.Load$.loadURI(Load.scala:289)
at sbt.Load$.load(Load.scala:285)
at sbt.Load$.load(Load.scala:276)
at sbt.Load$.apply(Load.scala:130)
at sbt.Load$.defaultLoad(Load.scala:36)
at sbt.BuiltinCommands$.doLoadProject(Main.scala:481)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$.process(Command.scala:92)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
at sbt.State$$anon$1.process(State.scala:184)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.MainLoop$.next(MainLoop.scala:98)
at sbt.MainLoop$.run(MainLoop.scala:91)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
at sbt.Using.apply(Using.scala:24)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
at sbt.MainLoop$.runLogged(MainLoop.scala:24)
at sbt.StandardMain$.runManaged(Main.scala:53)
at sbt.xMain.run(Main.scala:28)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:18)
at xsbt.boot.Boot$.runImpl(Boot.scala:41)
at xsbt.boot.Boot$.main(Boot.scala:17)
at xsbt.boot.Boot.main(Boot.scala)
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

also I tried

./sbt "project finatraHelloWorld" assembly

but I get the same error, right now I've started to think than the best option is start an empty project and follow http://twitter.github.io/finatra/assets/FinatraSFScala.pdf as guide

thanks..

@cacoco

This comment has been minimized.

Copy link
Member

commented May 26, 2015

Thanks for the information. However, I'm not able to reproduce your issue. Using the latest code from master I am able to run the sbt script in the base directory.

[finatra (master)]$ ./sbt
downloading sbt-launch.jar from http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar
[info] Loading project definition from /Users/ccoco/github/twitter/finatra/project
[info] Updating {file:/Users/ccoco/github/twitter/finatra/project/}finatra-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to root (in build file:/Users/ccoco/github/twitter/finatra/)
>

Also, to run the hello-world project since it is currently a stand-alone project you should cd into it then backtrack to run the top-level .sbt file (not ideal and we are updating this soon).

[finatra (master)]$ cd examples/finatra-hello-world/
[finatra-hello-world (master)]$
[finatra-hello-world (master)]$ ../../sbt clean +test
downloading sbt-launch.jar from http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar
[info] Loading project definition from /Users/ccoco/github/twitter/finatra/project
[info] Updating {file:/Users/ccoco/github/twitter/finatra/project/}finatra-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to root (in build file:/Users/ccoco/github/twitter/finatra/)
> exit
[Tue May 26 12:13:34 ccoco@horus finatra (master)]$ cd examples/finatra-hello-world/
[Tue May 26 12:13:41 ccoco@horus finatra-hello-world (master)]$ ../../sbt clean +test
[info] Skipping download of sbt-launch.jar.
[info] Loading project definition from /Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/project
[info] Set current project to finatraHelloWorld (in build file:/Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/)
[success] Total time: 0 s, completed May 26, 2015 12:14:48 PM
[info] Setting version to 2.10.4
[info] Reapplying settings...
[info] Set current project to finatraHelloWorld (in build file:/Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/)
[info] Updating {file:/Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/}finatraHelloWorld...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[warn] Scala version was updated by one of library dependencies:
[warn]  * org.scala-lang:scala-library:(2.10.4, 2.10.3) -> 2.10.5
[warn] To force scalaVersion, add the following:
[warn]  ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }
[warn] Run 'evicted' to see detailed eviction warnings
[info] Compiling 2 Scala sources to /Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/target/scala-2.10/classes...
[info] Compiling 1 Scala source to /Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/target/scala-2.10/test-classes...
...
[info] ScalaTest
[info] Run completed in 5 seconds, 653 milliseconds.
[info] Total number of tests run: 1
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[info] Passed: Total 1, Failed 0, Errors 0, Passed 1
[success] Total time: 18 s, completed May 26, 2015 12:15:07 PM
[info] Setting version to 2.11.6
[info] Reapplying settings...
[info] Set current project to finatraHelloWorld (in build file:/Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/)

If your problem is persisting I might recommend re-cloning the repository and trying again.

Thanks!

@cocodrino

This comment has been minimized.

Copy link
Author

commented May 29, 2015

thanks...I've re-cloned the repository again and seems works fine now..thank you!!!

@cocodrino cocodrino closed this May 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.