Mill plugin cross-compiles on the wrong axis - consider outsourcing
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?
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).
To elaborate on the "accidentally". Instead it should compile against Mill 0.6.0 and 0.10.0, to avoid to use any newer API. At runtime, it's perfectly fine to use the latest version or better, the one selected by .mill-version.
Can I get any feedback on this proposal?
Gentle ping, are there on thoughts on what @lefou offered up above?
https://github.com/lefou/mill-scala-steward
https://github.com/lefou/mill-scala-steward
btw this a 404 for me.
https://github.com/lefou/mill-scala-steward
btw this a 404 for me.
It was a private repo initially, now it's public.
Sorry for late response. Thanks for the repo and work. I would say scala-steward-org/mill-plugin rather than personal repo, if we split projects.
Sorry for late response. Thanks for the repo and work. I would say scala-steward-org/mill-plugin rather than personal repo, if we split projects.
Of course. I have no permissions to create a project in the scala-steward-org organization. But I'm happy to migrate. The intention was to give you all a feeling what we are talking about, tooling wise.
Of course. I have no permissions to create a project in the scala-steward-org organization. But I'm happy to migrate.
I've just invited you to the organization so that have the required permissions for transferring the repo if you want to.
Of course. I have no permissions to create a project in the scala-steward-org organization. But I'm happy to migrate.
I've just invited you to the organization so that have the required permissions for transferring the repo if you want to.
Thank you! I just transferred the repo to the organization. It's still called mill-scala-steward, as I don't have the permissions to rename it.
I just transferred the repo to the organization.
Thanks!
It's still called
mill-scala-steward, as I don't have the permissions to rename it.
You are now admin of this repository and should be able to rename it.
The plugin is not migrated to https://github.com/scala-steward-org/mill-plugin
The first release from this repo was 0.17.0