Scala 2.13.12 in-source sbt compiler bridge clarifications

The sbt compiler bridge sources have been copied from the Zinc repository to the Scala 2.13 compiler repository and the precompiled bridge will be released alongside the compiler from now on.

I would like to use this discussion to clarify some things for tooling developers.

  1. Scala 2.13.12 onwards will distribute a precompiled sbt compiler bridge binary that will be resolvable from Maven Central. This behavior matches Scala 3, which has been distributing a compiler bridge binary since the first 3.0 release. Tools that invoke the compiler will no longer have to compile the bridge from sources in order to use the compiler. Are these statements correct?

  2. The Scala Plugin for IntelliJ IDEA currently packages the sbt compiler bridge sources (originating from the Zinc repository) inside the plugin itself, in order to be able to compile the bridge and invoke the compiler. Today, I was able to build the Scala Plugin using Scala 2.13.12-bin-49d5507, from inside IDEA itself. This means that the Zinc compiler bridge sources were successfully compiled for Scala 2.13.12. Is this a lucky coincidence, and should we expect this to no longer be possible in the future, i.e. there will be a point in the future where the sbt bridge sources in the compiler will diverge from the ones in Zinc? Even if the bridge from the Zinc repository can be successfully compiled in the future, will it have fewer features, for example less or no support for quick fixes? Should we switch to dynamically resolving the precompiled bridge which is distributed with the compiler? In any case, we’re currently happy that our users will be able to use Scala 2.13.12 out of the box, without having to wait for a new patch release of the Scala Plugin.

Thanks in advance.

2 Likes

Yes. But all currently available sbt (and other build tool) releases don’t know about this change yet, so they will continue to compile the bridge from source also for 2.13.12+.

We will continue to remain source compatible with the bridge source as they currently are in zinc, otherwise existing zinc releases would not work with new Scala releases.

Yes, that is the case. Support for quick fixes is only there when using the binary bridge.

1 Like