如何获取有关“功能”标志警告的更多信息? [英] How to get more information about 'feature' flag warning?

查看:114
本文介绍了如何获取有关“功能”标志警告的更多信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用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.

这篇关于如何获取有关“功能”标志警告的更多信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆