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
T.command currently has two overloads, one accepting a Result (like most of the other task factories, T, T.input, T.task and so on) and one accepting a Task. Because of the second version, command definitions like the following don't do what the user thinks they do, although they seem to work.
This change deprecates all overloads accepting a Task in favor of accepting a Result. Results can be easily acquired from a Task by calling apply() or short ().
This is also the more correct way of re-using or re-defining tasks, since directly re-used tasks may result in an incorrect tasks context, esp. an incorrect source location, which is relevant when debugging misbehaving builds.
T.command
currently has two overloads, one accepting aResult
(like most of the other task factories,T
,T.input
,T.task
and so on) and one accepting aTask
. Because of the second version, command definitions like the following don't do what the user thinks they do, although they seem to work.Instead of creating a new command that depends on another command (the
super
-version) and returns just the result, it returns thesuper
-command as-is.The correct version is:
This change deprecates all overloads accepting a
Task
in favor of accepting aResult
.Result
s can be easily acquired from aTask
by callingapply()
or short()
.This is also the more correct way of re-using or re-defining tasks, since directly re-used tasks may result in an incorrect tasks context, esp. an incorrect source location, which is relevant when debugging misbehaving builds.
See https://github.com/com-lihaoyi/mill/issues/3517