Use cases for different sbt Key operators

前端 未结 3 1574
小蘑菇
小蘑菇 2021-02-04 03:53

The documentation for sbt seems to be really lacking here, so I\'d like to get a definitive answer on this: what is the difference between \"+=\", \"++=\", \"<+=\", \"<++=

3条回答
  •  醉话见心
    2021-02-04 04:46

    When the operators were deprecated, is there any documentation or porting guide what they mean or how to translate them to a currently used syntax?

    You can see example of such translation in recent (Dec. 2016) commits (in scala/scala itself) like:

    • fd3610c: avoid deprecated sbt 0.12 operators,
    • c6e79dd: Avoid 2 more deprecated sbt 0.12 operators

    You will see:

    -  incOptions <<= (incOptions in LocalProject("root")),
    +  incOptions := (incOptions in LocalProject("root")).value,
    

    or

    -    packagedArtifact in (Compile, packageBin) <<= (artifact in (Compile, packageBin), bundle).identityMap,
    +    packagedArtifact in (Compile, packageBin) := (((artifact in (Compile, packageBin)).value, bundle.value)),
    

    You can see more about the deprecation of those operators in sbt PR 2711, sbt PR 2716 and sbt/notes/0.13.13/ops_deprecation.md.

提交回复
热议问题