IntelliJ IDEA中`scala-2.11`文件夹的用途是什么? [英] What is the purpose of `scala-2.11` folder in IntelliJ IDEA

查看:337
本文介绍了IntelliJ IDEA中`scala-2.11`文件夹的用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近更新了IDEA和Scala插件后出现了scala-2.11文件夹。

它应该用于什么?

解决方案

通常这些目录用于二进制版本相关的代码。例如,2.10中的宏与2.11中的宏源不兼容,因此如果您正在为不同的二进制版本构建项目并且您正在使用宏,那么放置仅对特定版本有效的代码是有意义的。不同的来源根源。然后,SBT将在编译2.10或2.11时使用相应的目录。



如果你正在使用SBT,你需要在构建中手动设置这样的东西定义。如果你没有使用SBT,那么可能会更新IDEA插件以自行处理这些事情。


scala-2.11 folder appeared after recent update of IDEA and Scala plugin.
What should it be used for?

解决方案

Usually such directories are used for binary version-dependent code. For example, macros in 2.10 are not source-compatible with macros in 2.11, so if you're building your project for different binary versions and you're using macros, it makes sense to put code which is only valid for the specific version in different source roots. SBT then will use the appropriate directory when compiling for 2.10 or 2.11.

If you're using SBT, though, you would need to set such thing up manually in the build definition. If you're not using SBT, then probably IDEA plugin was updated to handle such things by itself.

这篇关于IntelliJ IDEA中`scala-2.11`文件夹的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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