What does `<< =` mean in SBT?

I see this <<= character in a lot of SBT code, but I don't understand what it does.

I also tried to search for this symbol, but received no answers.

Could you give me some documentation or an example that clearly explains what this symbol means and what it does?

+6
source share
2 answers

Oh, a deep explanation is rather complicated.

Mostly signature:

 def <<= (app: Initialize[Task[S]]): Setting[Task[S]] = macro std.TaskMacro.itaskAssignPosition[S] 

Therefore, it includes this macro:

 /* Implementations of <<= macro variations for tasks and settings. These just get the source position of the call site.*/ def itaskAssignPosition[T: c.WeakTypeTag](c: Context)(app: c.Expr[Initialize[Task[T]]]): c.Expr[Setting[Task[T]]] = settingAssignPosition(c)(app) 

I already used this type of operator when working with AspectJ compilation:

 products in Compile <<= products in Aspectj 

This basically means: base the source of the code on the AspectJ source files (generated by the plugin ), and not on the classic ones.

I interpret it as a kind of "replaceAll / erase":
Replace the bunch of files for compilation with AspectJ annotation files.

0
source

In addition to the pfn comment , this is described in docs 0.12 in the section More types of settings . I assume that it was removed from 0.13 documents, because now the same behavior can be defined in terms of := .

+4
source

All Articles