EzDevInfo.com

scalariform

Scala source code formatter Scalariform — Scalariform v0.1.0-SNAPSHOT documentation

How to format the sbt build files with scalariform automatically?

I'd like to format my sbt build files with scalariform. Is it possible to run scalariform on the build definition itself when starting sbt?


Source: (StackOverflow)

Is the usage of Scalariform as an embedded library considered abandoned?

I had been using Scalariform in a project I upgraded to Scala 2.11. In doing so, I discovered that Scalariform does not appear to have an artifact published for 2.11 in any of the usual places. This makes the usual sbt cross-version dependency unhappy.

As 2.11 has been out for a while already, this has me questioning if the usage of Scalariform as an embedded library should be considered abandoned? Has the community moved on to an alternative I just don't know about?


Source: (StackOverflow)

Advertisements

Unresolved dependency SBT, scalariform

I am receiving this compilation error:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.sbt#sbt-scalariform;1.3.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.typesafe.sbt:sbt-scalariform:1.3.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn] 

In the root of my project I have a build.sbt file:

   scalaVersion in ThisBuild := "2.11.6"

I also have a core/build.sbt file with several resolvers, libraryDependencies, and exclusions.

project/plugins.sbt:

   addSbtPlugin(...)
   resolvers += "Typesafe Public Repo" at "http://repo.typesafe.com/typesafe/releases"
   resolvers += "JBoss Repository" at "http://repository.jboss.org/nexus/content/groups/public//"

~/.sbt/0.13/global.sbt

   scalaVersion := "2.11.6"

Source: (StackOverflow)

sbt-scalariform plugin - can't resolve settings

I wanted to integrate scalariform tool into SBT. Following the https://github.com/sbt/sbt-scalariform/tree/master I created plugins.sbt file with line

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

then I created scalariform.sbt file with

scalariformSettings

Here I am stuck, when I try to run SBT for my project I am getting

scalariform.sbt:1: error: not found: value scalariformSettings

I also tried

import com.typesafe.sbt.SbtScalariform

SbtScalariform.scalariformSettings

in scalariform.sbt but then I am getting

scalariform.sbt:1: error: object typesafe is not a member of package com
import com.typesafe.sbt.SbtScalariform
           ^
scalariform.sbt:3: error: not found: value SbtScalariform
SbtScalariform.scalariformSettings
^

I saw the thread Sbt can't find SbtScalariform but it suggest changing the version to (1.1.0). Even if this worked (and it does not) I would prefer 1.3.0 version.


Source: (StackOverflow)