On Windows PowerShell, invoking mill.bat with -Dkey=0.1.0 fails with a misleading file-lock error during build script resolution.
Minimal build.mill:
import mill.*
object `package` extends RootModule {
def printProperty() = Task.Command {
println(System.getProperty("RELEASE_VERSION"))
}
}
Failing command:
.\mill.bat -DRELEASE_VERSION=0.1.0 printProperty
Actual behavior:
Mill appears to receive .1.0 printProperty rather than the intended system property argument, then fails with:
java.io.IOException: The process cannot access the file because another process has locked a portion of the file
at mill.api.PathRef$.apply(PathRef.scala:132)
at mill.api.BuildCtx$.evalWatch(BuildCtx.scala:69)
at mill.eval.ScriptModuleInit.resolveScriptModule(ScriptModuleInit.scala:197)
Expected behavior:
Either accept -Dkey=0.1.0, or reject it with a clear argument parsing error. It should not fail with a file-lock error.
These forms work in Powershell:
.\mill.bat -DRELEASE_VERSION="0.1.0" printProperty
.\mill.bat -D RELEASE_VERSION=0.1.0 printProperty
.\mill.bat --define RELEASE_VERSION=0.1.0 printProperty
In cmd.exe, this form also works:
mill.bat -DRELEASE_VERSION=0.1.0 printProperty
Environment:
Mill Build Tool version 1.1.5-44-d4c442
java.version: 21.0.10
java.vendor: Eclipse Adoptium
file.encoding: UTF-8
os.name: Windows 11
os.version: 10.0
os.arch: amd64
On Windows PowerShell, invoking
mill.batwith-Dkey=0.1.0fails with a misleading file-lock error during build script resolution.Minimal
build.mill:Failing command:
Actual behavior:
Mill appears to receive
.1.0 printPropertyrather than the intended system property argument, then fails with:Expected behavior:
Either accept
-Dkey=0.1.0, or reject it with a clear argument parsing error. It should not fail with a file-lock error.These forms work in Powershell:
In cmd.exe, this form also works:
Environment: