com-lihaoyi / mill

Mill is a fast JVM build tool that supports Java and Scala. 2-3x faster than Gradle and 5-10x faster than Maven for common workflows, Mill aims to make your project’s build process performant, maintainable, and flexible
https://mill-build.org/
MIT License
2.04k stars 328 forks source link

Incremental compilation issues in large(ish) projects #2003

Closed alexarchambault closed 1 year ago

alexarchambault commented 2 years ago

In the Scala CLI, but also in the coursier or Almond builds, we've been seeing consistently issues with incremental compilation. IIRC, these were things like whole module being re-compiled upon simple source changes that shouldn't require it.

These were frequent enough that we switched to mill-scala-cli to handle compilation in those projects (even it though it has some drawbacks). These issues are also quite hard or time-consuming to reproduce, and even more so to minimize. Which is quite frustrating, and is also why this wasn't reported earlier.

Sorry about the vague description here, I usually don't open issues if I don't have at least a repro, but I guess you asked for it ^^

alexarchambault commented 2 years ago

If you want to build Scala CLI without the mill-scala-cli plugin, you can add a line such as

  def enableScalaCli = false

right below this one.

lefou commented 2 years ago

Thanks for reporting. Although the description is vague, we recently fixed an issue with incremental compilation in 0.10.5, which could also be the cause for your observations.

It would be very helpful, if you could check whether a recent version of Mill >= 0.10.5 fixes your issues as well.

alexarchambault commented 1 year ago

Closing this issue… As of https://github.com/VirtusLab/scala-cli/pull/1335 (that uses Mill 0.10.7), it seems the incremental compilation issues went away. It seems to be the same on the coursier build, where I had enabled mill-scala-cli too.

lefou commented 1 year ago

Thanks for checking and reporting! This issue was already fixed in Mill 0.10.5 then.