Why do any changes to this sbt block block result in a type error?

I have a build.sbt file in a subproject that contains this block of code:

stopMySql := {
  val log = streams.value.log
  val pid = pidFileMysql.value
  if(pid.exists) {
    val id = IO read pid
    IO delete pid
    log.info(s"Trying to stop $id")
    Process(Seq("docker", "stop", id)) !! log
  } else {
    log.warn("No running mysql container found")
  }
}

If I touch any character in this block, my assembly will fail:

/home/xxxx/git/xxxxx/xxxxxxx/build.sbt:80: error: value value is not a member of sbt.SettingKey
  val pid = pidFileMysql.value
                         ^
[error] Type error in expression

For example, if I replace this line:

log.warn("No running mysql container found")

with this line (upper case M in mysql):

log.warn("No running mysql container found")

I can add lines outside the code without breaking the assembly. What is going on there? Is this code somehow magically signed by sbt and doesn’t allow it to be changed?

I use activator 1.2.10 to start the build.

Edit: additional information given in comments:

here is the gist of the whole file: https://gist.github.com/pumpadump/e256dc9da264469e48ab

it refers to the main project using this code:

lazy val mysql = (project in file("xxxxxxx"))
  .enablePlugins(SlickCodeGenMySql)
  .settings(commonSettings: _*)
  .settings(
    libraryDependencies ++= akkaDependencies ++ testDependencies ++ databaseDependencies
  ).dependsOn(testkit % "test")

- db . stopMysql, .

+4

All Articles