Skip to content

Decoupling of Mill core and libs bundles #7056

@lefou

Description

@lefou

As of now, Mill releases always contain the core tool as well as a lot of bundled language and tool libraries. While it is very convenient to develop and use, it also limits how fast each part can evolve. Providing some degree of binary compatibility means, we can't adapt specific languages at a different pace as the core runtime, and vice versa.

But essentially, this tight coupling isn't necessary. The Mill launcher, daemon, CLI, and the various integrations like javalib, scalalib or kotlinlib, to name a few, don't need to be coupled that tight. Especially, the various language libs could have a faster release speed when it comes to binary compatibility. We could improve the user experience faster by cutting new minor and major versions and deprecate blocking stuff faster. Since Mill 1.0 release, we have dropped wanted changes multiple times because of binary compatibility issues in the modules, but not in the core APIs of Mill. We also added a lot of cruft and workarounds to keep some compatibility but at the price of clarity and maintainability. Given, that Mill modules are Scala traits and changes to traits often require recompilation for all downstream derives, we are technically limited.

I therefore propose to split up the language modules (Java, Scala, Kotlin, ScalaJS, Scala Native, Groovy) from the Mill core platform (runner, evaluator, cli, launcher, daemon, and the core API including tasks and modules). This means we would have different versioning and binary compatibility guarantees for each.

I think for most of the issues I typically witnessed it's sufficient to keep the various JVM languages in the shared release, so we essentially end up with three release bundles:

  • Mill core
  • Mill libs
  • Mill contrib

Having the freedom to bump Mill libs from e.g. 1.1.5 to 2.0 to apply cleanups and improvements, also gives users the freedom to stay on Mill libs 1.x for a while and choose the best date for the switch. And in case they need to stay on Mill libs 1.x, they could still update Mill core to the newest compatible version to profit from improvements and fixes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions