Reputation: 3387
Is it possible to run the equivalent of scalac -print on one or more classes interactively within sbt (0.11.2)?
Upvotes: 10
Views: 1174
Reputation: 7019
-print
is a standard option to scalac, so you can add it to your scalacOptions
like usual. As an example, the following sbt session demonstrates temporarily adding it and recompiling:
$ sbt
> set scalacOptions in Compile += "-print"
> compile
...
However, this will recompile all sources (due to the options being different) and is not suitable for inspecting a small number of files out of a project of a decent size. I expect the REPL's power mode has a better solution, but it depends on your underlying problem.
Upvotes: 7