sbt consoleis used when you want to drop into a repl within the context of your sbt build. Ammonite has some of the same concepts, but is more used as either an alternative to the scala repl or as a script runner
❯ cs launch ammonite --scala-version 3.0.0 Loading... Welcome to the Ammonite Repl 2.3.8-124-2da846d2 (Scala 3.0.0 Java 14.0.1) @ import $ivy.`org.typelevel::cats-core:2.6.1` import $ivy.$ @ import cats._ import cats._ @ case class Test(a: Int) defined class Test @ given Eq[Test] with def eqv(t1: Test, t2: Test) = t1.a - t2.a == 0 defined object `` @ import cats.syntax.all._ import cats.syntax.all._ @ Test(25) === Test(35) res5: Boolean = false
go to sourcesin scala 3.0 with vscode.
ConfigReader(but I can find it manually with
WIth metals, I'm using sbt as my build server in an (experimental :-/) multi project setup,
I want to customise some integration tests
class WithDbFramework extends utest.runner.Framework
In an SBT terminal, the tests run fine.
If I click on the "ghost link" to run the test "in place" in metals, I get errors. The test looks for a test config file;
val confFile = new File("./modules/backend/src/test/scala/dev.conf")
which apparently, it can't find ...
[ERROR] Uncaught exception when running tests: org.ekrich.config.ConfigException$Missing: ./modules/backend/src/test/scala/dev.conf (not found): No configuration setting found for key 'db'
Would this be expected? Is it expected that an sbt terminal exhibits different behaviour to "metals runner"?
script.sc, suggestions should work fine? :o
script.scin an empty directory Metals will assume that you have an ammonite script and will prompt you to import it
fallbackScalaVersionin your settings