Is it possible to run the equivalent of scalac -print on one or more classes interactively within sbt (0.11.2)?
-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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With