Skip to content

Commit

Permalink
Update documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdziuban committed Jan 5, 2024
1 parent a175862 commit 2e226c3
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/modules/ROOT/pages/Scala_Module_Config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,21 @@ for details.
All ``ScalaModule``s have a `console` and a `repl` target, to start a Scala console or an Ammonite Repl.
To use the latter, you can (and sometimes need to) customize the Ammonite version to work with your selected Scala version.
When using the `console`, you can configure its `scalac` options using the `consoleScalacOptions` target.
For example, you may want to inherit all of your regular `scalacOptions` but disable `-Xfatal-warnings`:
.Example: Using `consoleScalacOptions` to disable fatal warnings
[source,scala,subs="attributes,verbatim"]
----
import mill._, scalalib._

object foo extends ScalaModule {
def consoleScalacOptions = scalacOptions().filterNot(o => o == "-Xfatal-warnings")
}
----
To use the `repl`, you can (and sometimes need to) customize the Ammonite version to work with your selected Scala version.
Mill provides a default Ammonite version,
but depending on the Scala version you are using, there may be no matching Ammonite release available.
In order to start the repl, you may have to specify a different available Ammonite version.
Expand Down

0 comments on commit 2e226c3

Please sign in to comment.