How to get more information about #39;feature#39; flag warning?(如何获取有关“功能标志警告的更多信息?)
问题描述
使用 Play2 编译应用程序时,有时我的终端上会出现以下消息:
When compiling an application with Play2, sometimes these kind of message appears on my terminal :
[info] 将 1 个 Scala 源代码编译到 ~/target/scala-2.10/classes...
[警告] 有 1 个功能警告;使用 -feature 重新运行以了解详细信息
[警告] 发现一个警告
[成功] 1s编译完成
[info] Compiling 1 Scala source to ~/target/scala-2.10/classes...
[warn] there were 1 feature warnings; re-run with -feature for details
[warn] one warning found
[success] Compiled in 1s
如何获得有关这些警告的更多信息?它必须是 sbt 的一个选项,但我不知道在哪里搜索......
How can I get more information about those warning? It must be an option of sbt but I have no idea where to search...
推荐答案
要查看确切的消息,您需要在 sbt 构建定义文件中添加feature"标志:
To see the exact message you need to add "feature" flag in your sbt build definition file:
scalacOptions ++= Seq("-feature")
为什么?Scala 2.10 不仅引入了新特性,还重新调整了旧特性——一些最强大的 scala 特性被隐藏了,因为它们应该以极大的责任感来使用:有时他们被错误地使用了.这就是 SIP-18 出现的原因.从现在开始,要访问动态、高级类型、存在类型和其他一些东西,您必须显式启用它们.
Why? Scala 2.10 not only introduced new features, but also reshuffled older ones -- some of the most powerful scala features were hidden because they should be used with great responsibility: sometimes they were used mistakingly. That is why SIP-18 has arised. From now on, to access dynamics, higher kinds, existential types and some other things you have to explicitly enable them.
这篇关于如何获取有关“功能"标志警告的更多信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何获取有关“功能"标志警告的更多信息?


基础教程推荐
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01