【问题标题】:In scala compilation, how to enable "no tail recursion option"在 scala 编译中,如何启用“无尾递归选项”
【发布时间】:2018-04-11 01:56:10
【问题描述】:

根据本文档:

https://www.scala-lang.org/old/sites/default/files/linuxsoft_archives/docu/files/tools/scalac.html

我应该使用“-g:notc”,所以我将它添加到我的 scala-maven-plugin 配置中:

      <args>
        <arg>-target:jvm-${java.version}</arg>
        <arg>-unchecked</arg>
        <arg>-deprecation</arg>
        <arg>-feature</arg>
        <arg>-g:vars</arg>
      </args>

当我使用 maven install 编译这个项目时,我得到了这个错误:

'notc' 不是 '-g' 的有效选择

是否删除了此选项?我应该改用什么?

【问题讨论】:

  • 只是好奇。为什么要关闭它?

标签: scala scalac scala-maven-plugin


【解决方案1】:

它被重命名了。来自man scalac 输出(2.12.2 版):

-g:{none,source,line,vars,notailcalls}

【讨论】:

    猜你喜欢
    • 2021-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-17
    • 1970-01-01
    • 2018-03-08
    • 2012-05-04
    • 2018-06-08
    相关资源
    最近更新 更多