You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-> % mill mymod.repl
No mill version specified.
You should provide a version via '.mill-version' file or --mill-version option.
Using mill version 0.11.6
[build.sc] [49/53] compile
[info] compiling 1 Scala source to /tmp/out/mill-build/compile.dest/classes ...
[info] done compiling
[46/46] mymod.repl
Exception in thread "main" java.lang.NoClassDefFoundError: mainargs/ArgReader
at ammonite.AmmoniteMain$.main0(AmmoniteMain.scala:51)
at ammonite.AmmoniteMain$.main(AmmoniteMain.scala:31)
at ammonite.AmmoniteMain.main(AmmoniteMain.scala)
Caused by: java.lang.ClassNotFoundException: mainargs.ArgReader
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
... 3 more
1 targets failed
mymod.repl java.lang.Exception: Interactive Subprocess Failed (exit code 1)
mill.util.Jvm$.runSubprocess(Jvm.scala:184)
mill.util.Jvm$.runSubprocessWithBackgroundOutputs(Jvm.scala:152)
mill.util.Jvm$.runSubprocess(Jvm.scala:88)
mill.scalalib.ScalaModule.$anonfun$repl$2(ScalaModule.scala:441)
scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
scala.Console$.withErr(Console.scala:193)
mill.api.SystemStreams$.$anonfun$withStreams$2(SystemStreams.scala:62)
scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
scala.Console$.withOut(Console.scala:164)
mill.api.SystemStreams$.$anonfun$withStreams$1(SystemStreams.scala:61)
scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
scala.Console$.withIn(Console.scala:227)
mill.api.SystemStreams$.withStreams(SystemStreams.scala:60)
mill.scalalib.ScalaModule.$anonfun$repl$1(ScalaModule.scala:448)
mill.define.Task$TraverseCtx.evaluate(Task.scala:71)
The text was updated successfully, but these errors were encountered:
This concrete issue is likely fixed, since we updated mainargs to it's latest version in PR #3019.
But this does not fix the general issue completely. One aspect is the version pinning we could improve (we already working towards that), the other aspect is that there is always a slight chance the repl will fail, when your local project / classpath has conflicting dependencies with the repl itself. A workaround in such situations can be to use the alternative console, which might have less features, but also less dependencies.
It seems like
_.repl
fails to launch when the module depends onmainargs
as well. Reproducible case:Output:
The text was updated successfully, but these errors were encountered: