not found: value SbtScalariform

225 views
Skip to first unread message

Marius

unread,
Sep 2, 2013, 2:35:31 AM9/2/13
to simple-b...@googlegroups.com
.sbt/plugins/build.sbt

resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.4.0")



my_project/project/plugins.sbt

resolvers += Classpaths.typesafeResolver

addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.0.1")


my_project/project/Build.sbt
import sbt._
import sbt.Keys._
import com.typesafe.sbt.SbtScalariform.scalariformSettings

object MyProjectBuild extends Build {
//............
  lazy val formatSettings = SbtScalariform.scalariformSettings ++ Seq(
      ScalariformKeys.preferences in Compile := formattingPreferences,
      ScalariformKeys.preferences in Test    := formattingPreferences
    )

//............


}

and I have an error: not found: value SbtScalariform

What I have:
ubuntu: 13.04
sbt: 0.12.2
scala: 2.10.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_25). 

What's wrong with that?

Heiko Seeberger

unread,
Sep 2, 2013, 3:19:34 AM9/2/13
to simple-b...@googlegroups.com
If you want to use the full build definition, your file must be named `project/Build.scala` (the suffix is the important part here), not `project/something.sbt`.

Heiko

--

Heiko Seeberger
Twitter: @hseeberger
Blog: blog.heikoseeberger.name

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-build-t...@googlegroups.com.
To post to this group, send email to simple-b...@googlegroups.com.
Visit this group at http://groups.google.com/group/simple-build-tool.
For more options, visit https://groups.google.com/groups/opt_out.

Marius

unread,
Sep 2, 2013, 5:55:27 AM9/2/13
to simple-b...@googlegroups.com
it's actually named so -- project_name/Build.scala.

Heiko Seeberger

unread,
Sep 2, 2013, 6:05:56 AM9/2/13
to simple-b...@googlegroups.com
On Sep 2, 2013, at 11:55 AM, Marius <gilded...@gmail.com> wrote:

it's actually named so -- project_name/Build.scala.

Ah, OK.

It looks like you don't import SbtScalariform, but only its member scalariformSettings.

Heiko

Marius

unread,
Sep 2, 2013, 10:38:00 AM9/2/13
to simple-b...@googlegroups.com
and?

Heiko Seeberger

unread,
Sep 2, 2013, 11:13:07 AM9/2/13
to simple-b...@googlegroups.com
On Sep 2, 2013, at 4:38 PM, Marius <gilded...@gmail.com> wrote:

and?

I don't understand you question: You wrote that you get an error "not found: value SbtScalariform". As far as I can tell from the code snippets you provided you forgot to import SbtScalariform as  a fully qualified term, i.e. import com.typesafe.sbt.SbtScalarifrom, because you are using it in the snippet "lazy val formatSettings = SbtScalariform.scalariformSettings ++ Seq(". You could also change this snippet to "lazy val formatSettings = scalariformSettings ++ Seq(" and keep the import of "com.typesafe.sbt.SbtScalariform.scalariformSettings".

Hoping this help!

Marius

unread,
Sep 2, 2013, 4:57:47 PM9/2/13
to simple-b...@googlegroups.com
if you don't understand it, then it read it again.

Paul Phillips

unread,
Sep 2, 2013, 7:39:05 PM9/2/13
to simple-b...@googlegroups.com

On Mon, Sep 2, 2013 at 1:57 PM, Marius <gilded...@gmail.com> wrote:
if you don't understand it, then it read it again.

He gave you a complete and by appearances correct answer. "I don't understand your question" was a polite way of saying that your question had already been answered - twice, now. The politeness you have been shown now far exceeds the amount you have earned.

Som Snytt

unread,
Sep 2, 2013, 9:31:33 PM9/2/13
to simple-b...@googlegroups.com

This would be a case of gilded honour shamefully misplaced?


--
Message has been deleted

Marius

unread,
Sep 2, 2013, 11:25:22 PM9/2/13
to simple-b...@googlegroups.com
I think it would.
Message has been deleted

Marius

unread,
Sep 2, 2013, 11:29:35 PM9/2/13
to simple-b...@googlegroups.com
it works pretty well on at other guy's system without any additional imports. In fact, I added the last import by myself, it  wasn't there initially (yet it worked at other system as I said before), but even that didn't help me.

nafg

unread,
Sep 11, 2013, 1:17:42 AM9/11/13
to simple-b...@googlegroups.com

On Monday, September 2, 2013 5:55:27 AM UTC-4, Marius wrote:
it's actually named so -- project_name/Build.scala.

It needs to be <project_name>/project/Something.scala. Otherwise it's part of the project you're writing, not its build definition.
Reply all
Reply to author
Forward
0 new messages