如何找到 Scala 编译器标志/选项的描述? [英] How can I find a description of scala compiler flags/options?
问题描述
如何找到最新 scalac 版本的所有标志?谷歌搜索几个小时后,我只发现 过时 文档.(例如,他们甚至没有提到-feature"标志).
How can I find all of the flags for the latest scalac version? After googling for hours I have found only outdated docs. (for example, they don't even mention "-feature" flag).
有没有办法从 scalac 或其他任何东西中获取带有描述的编译器标志列表?
Is there any way to obtain the list of compiler flags with descriptions from scalac, or anything else?
推荐答案
我能找到的最接近的是编译器的相关源文件.不幸的是,这些选项分布在多个文件中.在撰写本文时,它分解如下:
The closest I have been able to find is the relevant source files for the compiler. Unfortunately the options are spread among several files. As of this writing, it breaks down like so:
- StandardScalaSettings (for basic flags)
- ScalaSettings (for advanced flags)
这些当然适用于当前开发版本的编译器,因此如果您想要特定版本的 scalac
的选项,则需要使用分支"下拉菜单查看正确的版本标签.
These will of course be for the current development version of the compiler, so if you want options for a specific version of scalac
, you'll need to use the "branch" drop-down menu to view the correct version tag.
这篇关于如何找到 Scala 编译器标志/选项的描述?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!