-
-
Notifications
You must be signed in to change notification settings - Fork 421
Closed
Labels
Milestone
Description
After migrating from 0.11.1 to any higher version, a project, that was working fine, fails on certain commands with an exception.
It happens in this repo: https://github.com/VirtusLab/scala-js-cli e.g. after doing ./mill -i 'tests.test'
Stack trace after setting the version to 0.11.2:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at mill.main.client.IsolatedMillMainLoader.runMain(IsolatedMillMainLoader.java:58)
at mill.main.client.MillClientMain.main(MillClientMain.java:64)
Caused by: java.util.NoSuchElementException: head of empty list
at scala.collection.immutable.Nil$.head(List.scala:662)
at scala.collection.immutable.Nil$.head(List.scala:661)
at mill.eval.GroupEvaluator$$anonfun$1.applyOrElse(GroupEvaluator.scala:103)
at mill.eval.GroupEvaluator$$anonfun$1.applyOrElse(GroupEvaluator.scala:88)
at scala.collection.Iterator$$anon$7.hasNext(Iterator.scala:525)
at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:601)
at scala.collection.IterableOnceOps.foldLeft(IterableOnce.scala:675)
at scala.collection.IterableOnceOps.foldLeft$(IterableOnce.scala:670)
at scala.collection.AbstractIterator.foldLeft(Iterator.scala:1300)
at scala.collection.IterableOnceOps.sum(IterableOnce.scala:945)
at scala.collection.IterableOnceOps.sum$(IterableOnce.scala:943)
at scala.collection.AbstractIterator.sum(Iterator.scala:1300)
at mill.eval.GroupEvaluator.evaluateGroupCached(GroupEvaluator.scala:136)
at mill.eval.GroupEvaluator.evaluateGroupCached$(GroupEvaluator.scala:43)
at mill.eval.EvaluatorImpl.evaluateGroupCached(EvaluatorImpl.scala:15)
at mill.eval.EvaluatorCore.$anonfun$evaluate0$2(EvaluatorCore.scala:116)
at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:467)
at mill.eval.ExecutionContexts$RunNow$.execute(ExecutionContexts.scala:13)
at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:429)
at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:338)
at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:312)
at scala.concurrent.impl.Promise$DefaultPromise.map(Promise.scala:182)
at mill.eval.EvaluatorCore.$anonfun$evaluate0$1(EvaluatorCore.scala:92)
at mill.eval.EvaluatorCore.$anonfun$evaluate0$1$adapted(EvaluatorCore.scala:90)
at scala.collection.immutable.VectorStatics$.foreachRec(Vector.scala:2122)
at scala.collection.immutable.Vector.foreach(Vector.scala:2128)
at mill.eval.EvaluatorCore.evaluate0(EvaluatorCore.scala:90)
at mill.eval.EvaluatorCore.$anonfun$evaluate$1(EvaluatorCore.scala:43)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
at mill.eval.EvaluatorCore.evaluate(EvaluatorCore.scala:34)
at mill.eval.EvaluatorCore.evaluate$(EvaluatorCore.scala:26)
at mill.eval.EvaluatorImpl.evaluate(EvaluatorImpl.scala:15)
at mill.main.RunScript$.evaluateNamed(RunScript.scala:38)
at mill.main.RunScript$.$anonfun$evaluateTasksNamed$2(RunScript.scala:26)
at scala.util.Either.map(Either.scala:382)
at mill.main.RunScript$.evaluateTasksNamed(RunScript.scala:26)
at mill.runner.MillBuildBootstrap$.evaluateWithWatches(MillBuildBootstrap.scala:358)
at mill.runner.MillBuildBootstrap.$anonfun$processFinalTargets$2(MillBuildBootstrap.scala:268)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
at mill.runner.MillBuildBootstrap.processFinalTargets(MillBuildBootstrap.scala:268)
at mill.runner.MillBuildBootstrap.evaluateRec(MillBuildBootstrap.scala:159)
at mill.runner.MillBuildBootstrap.evaluate(MillBuildBootstrap.scala:47)
at mill.runner.MillMain$.$anonfun$main0$5(MillMain.scala:207)
at mill.runner.Watching$.watchLoop(Watching.scala:27)
at mill.runner.MillMain$.$anonfun$main0$1(MillMain.scala:193)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
at scala.Console$.withErr(Console.scala:193)
at mill.api.SystemStreams$.$anonfun$withStreams$2(SystemStreams.scala:56)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
at scala.Console$.withOut(Console.scala:164)
at mill.api.SystemStreams$.$anonfun$withStreams$1(SystemStreams.scala:55)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
at scala.Console$.withIn(Console.scala:227)
at mill.api.SystemStreams$.withStreams(SystemStreams.scala:54)
at mill.runner.MillMain$.main0(MillMain.scala:80)
at mill.runner.MillMain$.main(MillMain.scala:58)
at mill.runner.MillMain.main(MillMain.scala)
... 6 more
It points to main/eval/src/mill/eval/GroupEvaluator.scala line 103, where a head call has been introduced in #2417.
james-s-w-clark