Serhii
Serhii

Reputation: 7543

SBT `session save` - [info] No session settings defined

I try SBT following tutorial steps:

$ mkdir foo-build
$ cd foo-build
$ touch build.sbt
$ sbt
...
sbt:foo-build>
...
sbt:foo-build> compile
sbt:foo-build> run
[info] Packaging ~/Development/projects/research/scala/foo-build/target/scala-2.12/foo-build_2.12-0.1.0-SNAPSHOT.jar ...
[info] Done packaging.
[info] Running example.Hello 
Hello
[success] Total time: 0 s, completed Aug 4, 2018, 12:10:41 PM
sbt:foo-build> scalaVersion
[info] 2.12.6
sbt:foo-build> session save
[info] No session settings defined.

following documentation, I expect

Save the session to build.sbt 
We can save the ad-hoc settings using session save.

sbt:foo-build> session save
[info] Reapplying settings...
build.sbt file should now contain:
ThisBuild / scalaVersion := "2.12.6"

but it is not with message [info] No session settings defined..

Is any ideas how to resolve this issue?

Upvotes: 2

Views: 256

Answers (1)

norbjd
norbjd

Reputation: 11237

If I follow the steps you provided, you did not made changes to your build. Looks like you have forgotten this step :

set ThisBuild / scalaVersion := "2.12.6"

Hence the message [info] No session settings defined..

Upvotes: 3

Related Questions