Open lihaoyi opened 1 month ago
I'd like to extends this also for standard build steps. For example have a no-op trait defining compile
, and all existing Languages extend that, so that we can easily stack languages on top of each other. Currently we can stack Kotlin on top of Java, but not Java on top of Kotlin.
As a more in-depth motivation: Although Kotlin as well as Scala support Java sources, they get in trouble when there comes a newer Java language feature or when the Java code is supposed to be processed further (thinking of annotation processors or AspectJ compilers). Having a interface-only trait as a base, we can make sure, a super
-call is always possible. Being free to stack in arbitrary order would be of great help.
And since we try to learn from this, we also should introduce interface-only traits for Linting and coverage collecting, so users can easily stack these in whatever order to achieve their setups.
Gradle calls these Lifecycle Tasks https://docs.gradle.org/current/userguide/organizing_tasks.html, which are tasks which don't do any of the work themselves but are used to group related tasks together under standardized labels for easy discoverability and usage
We now support 3 languages: Scala, Java, and Kotlin. Each of these has linters, autoformatters, code coverage reporters, on top of the existing "standard" tasks like compile, run, test, publish, etc.
It would be nice if we could standardize
.lint
,.autoformat
,.coverage
, etc. as well. That will help keep the experience of using Mill consistent regardless of what language the codebase is written in, and would especially help in multi-language polyglot codebases