mill icon indicating copy to clipboard operation
mill copied to clipboard

Bug in `__:Type` syntax

Open Shri333 opened this issue 1 year ago • 2 comments

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

Shri333 avatar Sep 27 '24 12:09 Shri333

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

lefou avatar Sep 27 '24 13:09 lefou

I think I've hit similar issues when working on unrelated tasks, but haven't had time to investigate

lihaoyi avatar Sep 30 '24 02:09 lihaoyi

Releated:

  • #4514

lefou avatar Feb 08 '25 13:02 lefou