Description
Scala-Steward currently cross-compiles the Mill plugin for Scala 2.12 and 2.13. To do that, it compiles against Mill versions 0.6.3 (Scala 2.12) and 0.10.7 (Scala 2.13). This (accidentally) results in binary compatibility to Mill 0.6.x (binary platform 0.6) and Mill 0.10.x (binary platform 0.10). But the plugin cannot be loaded by Mill versions with other Mill binary platforms, e.g. 0.7
or 0.9
.
This is especially unfortunate, as Scala-Steward is all about updating older setups, but as it is effectively not updating any project using Mill between 0.7.0 and 0.9.12 (which are not that old versions), it feels like a "Mission failed". Also, when the next Mill binary platform comes out (0.11?) and Scala Steward updated it's dependency to it, we will probably miss any 0.10 updates too.
In previous discussions with @fthomas, he stated that he isn't able to suport/maintain more than the two Scala version based cross-builds. Back then, I privately tried to come up with a PR and changed the sbt build to do the appropriate cross-compiling with sbt-projectmatrix, but I never got it working to my satisfaction. But doing the necessary cross compile setup in Mill is easy for me. So here is my suggestion:
The Mill plugin is rather stable and changed seldomly in the past. We could outsource the mill-plugin into a separate Mill project. That way, we could easily build the plugin for all necessary Mill binary platforms. As a bonus, we could also add some integration tests for free. I'm willing to contribute the initial work. (I already have such setup ready for review, but I'd rather wait with making it public until we settle on that approach.)
Of course, there are alternatives, e.g. someone could implement the Mill binary platform based cross-building in sbt. But I'm not deep enough into sbt to do that, so this is IMHO a less actionable option.
WDYT?