Sbt plugins and future binary-incompatible Scala versions

In a few months at most, Scala 2.13 will be released, and sbt plugin authors will once again have to deal with writing code in an obsolete version of Scala, as sbt is built using Scala 2.12. Rather than waiting years for a hypothetical sbt 2.0 to switch the scala binary version used, I think it would be worthwhile to consider a more incremental approach:

  1. Start publishing sbt cross-built for 2.12 and 2.13 as soon as 2.13 is released
  2. Make it possible to choose the binary version of sbt used in the current project, for example with a setting scala.binaryVersion=2.13 in project/
  3. Encourage plugin authors to cross-build their plugins
  4. Once the ecosystem is ready, release a new version of sbt where scala.binaryVersion=2.13 is the default, this would still be an sbt 1.x release since it wouldn’t break the API of sbt itself.
  5. Eventually drop support for scala.binaryVersion=2.12

Alternative proposals welcome. In any case, I think it would be worthwhile to decide on a plan and write it down somewhere, so that plugin authors know what to expect.


As an alternative approach to waiting few years for sbt 2.x or breaking sbt 1.x API too soon, this is an interesting idea.

There might be some added burden on the build users to figure out if a particular plugin is available in Scala 2.13 or not, but I guess people are used to figuring that out.

I’d be interested in hearing opinions from both the build users and plugin authors.

  1. Encourage plugin authors to cross-build their plugins

Would having a community build for 2.13.0.Mx help here? Especially for the plugins that are dependencies for many other plugins and projects.

Scala team’s Community build uses library ecosystem as a fixed value L1, and change the Scala version V1 parameter to the latest 2.13.x SNAPSHOT to determine the impact of compiler change to the library ecosystem.

If we set something up for the plugin ecosystem P1, with V1 set to 2.13.0-M3, people might be encouraged to prepare for the cross built plugins before the hypothetical cross-built sbt release?

link to when this was discussed for the release of sbt 1: