SBT, the difference between << = and: =

These methods are not described in the documentation . I mainly use :=in my .sbt files, but sometimes due to reasons that I still don’t understand, the tasks that I assign using :=do not work (which means that the tasks do not create side effects and do not allow, t to return that anyway) and work with <<=. So what is the difference between <<=and :=?

Edit:

In my example below, the cleanup task is performed, and when this is done ( doFinally), two other tasks are performed simultaneously.

gae_prep_war := {
  val after = Def.task {
    (gae_copyJars).value; (compile in Compile).value;
  }
  (gae_clean, after) {
    (clean, task) => clean doFinally task
  }
}

As of now, this does not work, there is no error, but there is no effect or conclusion; if i change :=to <<=, it works. My SBT version is 0.13.0 and uses Scala 2.10.2.

Edit2:

, := , .value :

gae_prep_war := {
  val after = Def.task {
    (gae_copyJars).value; (compile in Compile).value;
  }
  (gae_clean, after) {
    (clean, task) => clean doFinally task
  }
}.value

  ^

, ...

+4

Source: https://habr.com/ru/post/1534517/


All Articles