即使我有不匹配的条件来运行它,SBT也会评估一个InputTask

时间:2017-12-20 15:09:51

标签: sbt

这是我的代码:

run in Compile := { true match {
    case true => (run in Compile).evaluated
    case false => (run in Compile).evaluated
}}

输出:

> run
[info] Running Main 
[info] Running Main 
Main.main
Main.main

我希望SBT只评估(run in Compile)一次!但它运行了两次!为什么!我错过了什么吗?

1 个答案:

答案 0 :(得分:0)

我的错误!宏的行为是对的!我必须使用$q = "DELETE FROM group_info, contacts USING group_info INNER JOIN contacts WHERE group_info.gid = '$gid' AND contacts.gid = group_info.gid"; 来定义我的任务:dpdk patch