简体   繁体   English

你如何评论.sbt文件中的一行

[英]How do you comment a line in .sbt file

This may sound like a stupid question, but I've been searching all over the internet on how to comment a line in an sbt file. 这可能听起来像一个愚蠢的问题,但我一直在互联网上搜索如何在sbt文件中注释一行。 Does anyone know how to? 有谁知道怎么做?

// creates the comment. //创建评论。 It is rather easy to find. 它很容易找到。

Edit: An sbt build file uses Scala syntax with some DSL on top of it. 编辑:sbt构建文件使用Scala语法和一些DSL。 As per documentation : 根据文件

Each Setting is defined with a Scala expression. 每个设置都使用Scala表达式定义。 The expressions in settings are independent of one another, and they are expressions, rather than complete Scala statements. 设置中的表达式彼此独立,它们是表达式,而不是完整的Scala语句。

So if you wonder what for instance lazy val root means you should rather search Scala documentation ( or SO ) for the answer. 因此,如果您想知道什么是lazy val root意味着您应该搜索Scala文档( 或SO )以获得答案。

On the other hand many "operators" (like +=, :=) are the part of sbt's DSL - they simply methods explained to some degree in the settings section . 另一方面,许多“运算符”(如+ =,= =)是sbt DSL的一部分 - 它们只是在设置部分中对方法进行了一定程度的解释。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM