mill
mill copied to clipboard
Bug in `__:Type` syntax
Resolve is working incorrectly. If I have the following build.mill:
package build
import mill._, javalib._
trait TypeA extends Module {
def foo = Task { "foo" }
}
trait TypeB extends Module {
def bar = Task { "bar" }
}
trait TypeC extends Module {
def baz = Task { "baz" }
}
trait TypeAB extends TypeA with TypeB
object typeA extends TypeA
object typeB extends TypeB
object typeC extends TypeC {
object typeA extends TypeA
}
object typeAB extends TypeAB
Running mill resolve _:TypeA._ produces the following output:
typeA.foo
typeAB.bar
typeAB.foo
But, running mill resolve __:TypeA._ produces the following output:
clean
init
inspect
path
plan
resolve
show
showNamed
shutdown
typeA
typeA.foo
typeAB
typeAB.bar
typeAB.foo
typeB
typeC
typeC.typeA.foo
version
visualize
visualizePlan
That's strange, we have a test for this case. https://github.com/com-lihaoyi/mill/blob/0e50ff7ee3216f8224958e150dbfeac6113a2ce1/main/resolve/test/src/mill/main/ResolveTests.scala#L973-L976
I think I've hit similar issues when working on unrelated tasks, but haven't had time to investigate
Releated:
- #4514