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.03k stars 319 forks source link

Add some kind of API to require a minimum version of mill #466

Open lefou opened 5 years ago

lefou commented 5 years ago

There should be some way to declare the minimal required mill version to be used.

If you currently start the build with the wrong version of mill, you might get strange compile errors or unexpected behaviour. Worst case, you get a successful build even though it is not correct.

If the buildfile can require a minimal version, and used plugins can tell it too, you will get a meaningful error message, indicating to update to the specified mill version.

lefou commented 5 years ago

Somewhere between mill 0.2.9 and 0.3.5, some API incompatibilities were introduced that made my mill plugin mill-osgi (https://github.com/lefou/mill-osgi) fail. I could fix it by using the new os-lib API and removing usage of ammonite-ops API. Now, the question is, how can I tell my users that they should use at least mill-0.3.5? I'm thinking about adding a check against the internal MILL_VERSION environment variable. But isn't my case a good motivation for this issue? If there would be some API to declare some mill version constraints, I simply could state that my plugin needs at least version 0.3.5. Mill could tell the user what exactly went wrong (used version, required version, offending plugin).

lefou commented 7 months ago

Lots have changed in Mill and most compatibility issues can be detected by convention (Mill binary platform) and dependency resolution.

lefou commented 7 months ago

Opened issue https://github.com/coursier/coursier/issues/2927