Version Matrix


Build Status License

scalac options for the enlightened

sbt-tpolecat is an SBT plugin for automagically configuring scalac options according to the project Scala version, inspired by Rob Norris (@tpolecat)'s excellent series of blog posts providing recommended options to get the most out of the compiler.

It also enables the excellent sbt-partial-unification plugin for those Scala versions where it is needed.

As of version 0.1.11, it also supports setting options for Dotty.


Add the following to your project's project/plugins.sbt:

addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17")

If necessary you can filter out scalac options that are unhelpful in the REPL from user-defined tasks or scopes.

By default the plugin only applies this filtering to the console task in the Compile and Test configurations. ~= filterConsoleScalacOptions


I can't promise this plugin will work for old minor releases of Scala. It has been tested with:

  • 2.13.5
  • 2.13.4
  • 2.13.3
  • 2.12.12
  • 2.11.12
  • 2.10.7

and Dotty versions:

  • 3.0.0-M1
  • 0.27.0-RC1
  • 0.26.0


All code in this repository is licensed under the Apache License, Version 2.0. See LICENSE.