使用Scala解释器时,可以使用以下选项启动它:
C:\Users\John>scala -unchecked
Welcome to Scala version 2.9.2 (Java HotSpot(TM) Client VM, Java 1.6.0_32).
Type in expressions to have them evaluated.
Type :help for more information.
scala>
使用sbt时,如何使用选项启动Scala解释器? 以下尝试不起作用:
C:\Users\John\Test Scala Project 1>sbt
[...]
[info] Loading global plugins from C:\Users\John\.sbt\plugins
[info] Set current project to default-8d4ecc (in build file:/C:/Users/John/Tes
t%20Scala%20Project%201/)
> console -unchecked
[error] Expected end of input.
[error] console -unchecked
[error] ^
Google&我无法弄清楚如何在sbt shell中执行此操作。有谁知道吗?
答案 0 :(得分:2)
dcs@shadowfax:~/github/ConwayLife (master *)$ sbt
[info] Loading global plugins from /home/dcs/.sbt/plugins/project
[info] Loading global plugins from /home/dcs/.sbt/plugins
[info] Loading project definition from /home/dcs/github/ConwayLife/project
[info] Set current project to default-0d85ea (in build file:/home/dcs/github/ConwayLife/)
default-0d85ea:master>set scalacOptions += "-unchecked"
[info] Reapplying settings...
[info] Set current project to default-0d85ea (in build file:/home/dcs/github/ConwayLife/)