Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build, remove TestModule.UTest from AmmInternalModule (#1389)
This fixes the issue #1386: ``` > ./mill -i amm.repl[3.2.2].test GITHUB REF None fatal: no tag exactly matches 'cdeaa580bf128779686991a838623dd3a75af49b' [296/296] amm.repl[3.2.2].test java.lang.ClassNotFoundException: utest.runner.Framework java.lang.ClassNotFoundException: utest.runner.Framework at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476) at mill.api.ClassLoader$$anon$1.findClass(ClassLoader.scala:47) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527) at mill.testrunner.TestRunner$.framework(TestRunner.scala:412) at mill.testrunner.TestRunner$.$anonfun$main$2(TestRunner.scala:252) at mill.testrunner.TestRunner$.$anonfun$runTestFramework$2(TestRunner.scala:326) at mill.util.Jvm$.inprocess(Jvm.scala:30) at mill.testrunner.TestRunner$.runTestFramework(TestRunner.scala:320) at mill.testrunner.TestRunner$.main(TestRunner.scala:258) at mill.testrunner.TestRunner.main(TestRunner.scala) 1 targets failed amm.repl[3.2.2].test Test execution failed. ``` The issue is, that `amm.repl[3.2.2]` (defined by `ReplModule` which extends `AmmModule` which itself extends `AmmoniteInternalModule`) is itself a `TestModule.UTest`. That means, it already has a `test` target, so that the resolver will never search for a submodule that implements a `defaultCommand`. After removing `TestModule.UTest` from `AmmoniteInternalModule`, the cli call properly resolves to `amm.repl[3.2.2].test.test`. I'm curious to know, why this even compiled. We end up with two class members `test`, one `def` with the test target, and one `object` with the test sub-module. Pull request: #1389
- Loading branch information