I have good news to share about tasty-query and TASTy-MiMa. We completed all the milestones mentioned above, and released a prototype of TASTy-MiMa.
Developing all the required features in tasty-query took more time than expected, but in the past few months, we made a lot of progress. We achieved enough coverage of the Scala type system to implement a meaningful prototype of TASTy-MiMa.
Relevant links
- GitHub - scalacenter/tasty-query
- GitHub - scalacenter/tasty-mima: TASTy Migration Manager
- GitHub - scalacenter/sbt-tasty-mima: sbt plugin for TASTy-MiMa
In particular, follow the link to tasty-mima for usage instructions in an sbt build.
Status and request for testing
We published a first prototype of TASTy-MiMa, along with an sbt plugin sbt-tasty-mima
v0.1.2 v0.1.3. It is quite young, but you can already help by trying it out on your project. The readme of TASTy-MiMa contains essential usage instructions for sbt-tasty-mima.
If your public API exposes type refinements and/or match types, expect severe limitations. Otherwise, please file any issues you may encounter.
tasty-query is also used by other projects, including the debugger for Scala 3 in Metals, and a work-in-progress research project for a TASTy Interpreter.
Why not make this part of MiMa?
TASTy-MiMa and MiMa achieve different although related goals.
One can wonder why not merge them as a single tool?
There are several reasons for that, at least at this point:
- Huge maturity gap: MiMa is very mature and should be used by every library that is serious about compatibility. TASTy-MiMa is still in its infancy and likely to break, so we cannot recommend using it yet.
- Different underlying codebase: MiMa and TASTy-MiMa contain no code in common; their underlying model is vastly different (JVM type system versus Scala type system).
- Different (although similar) user-level API: the set of problems reported by MiMa and TASTy-MiMa is not the same (because they don’t have the same underlying model at all), so even if they were exposed as a single sbt plugin, the configurations would have to be using separate keys. The only real key in common is the
mimaPreviousArtifacts
/tastyMiMaPreviousArtifacts
.
Next steps
The next steps for this set of projects will be the following:
- Enable TASTy-MiMa on real-world Scala 3 libraries
- Identify and fix important bugs preventing the above
- Expand the support of tasty-query for type refinements and match types
- Provide a Mill plugin for TASTy-MiMa
How can you help?
- Test sbt-tasty-mima on your library, if it does not expose type refinements nor match types in its public API. Report any issues you encounter.
- If you are familiar with Mill plugins, contribute a Mill plugin for TASTy-MiMa. You will probably want to take inspiration from the sbt plugin of TASTy-MiMa as well the existing Mill plugin for MiMa.