【问题标题】:What's the difference between :, :: and / in SBT?SBT 中的 :: 和 / 有什么区别?
【发布时间】:2020-05-09 02:47:27
【问题描述】:

我试图回忆在 SBT 上做某事时我想要的是 test:compiletest::compile 还是 test/compile,当我突然想到虽然我对使用哪个分隔符有一些直觉,但我不清楚每个分隔符的用途。

那么,当在 sbt 控制台上输入任务时,我什么时候/为了什么使用:::/

【问题讨论】:

    标签: sbt


    【解决方案1】:

    Different separators 用于不同的scope axis

    • 单个冒号: 遵循配置轴
    • 双冒号:: 遵循任务轴
    • 斜线/ 跟随子项目轴

    然而这些已经被斜杠语法统一了:Unification of sbt shell notation and build.sbt DSL讨论导致Unify sbt shell and build.sbt syntax (scope path syntax) #34341.1.0斜杠语法发布

    <project-id>/<config-ident>/intask/key
    

    对应

    <project-id>/config:intask::key
    

    因此,例如,

    show root/Compile/compile/scalacOptions
    

    对应

    show root/compile:compile::scalacOptions
    

    相关问题:what does a single colon mean in sbt

    【讨论】:

      猜你喜欢
      • 2018-02-12
      • 1970-01-01
      • 1970-01-01
      • 2012-11-28
      • 2020-07-28
      • 1970-01-01
      • 1970-01-01
      • 2010-10-02
      • 2011-12-12
      相关资源
      最近更新 更多