Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in __:Type syntax #3618

Open
Shri333 opened this issue Sep 27, 2024 · 3 comments
Open

Bug in __:Type syntax #3618

Shri333 opened this issue Sep 27, 2024 · 3 comments
Labels
bug The issue represents an bug

Comments

@Shri333
Copy link
Contributor

Shri333 commented Sep 27, 2024

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
@lefou
Copy link
Member

lefou commented Sep 27, 2024

That's strange, we have a test for this case.

test - check(
"__:TypeA._",
Right(Set(_.typeA.foo, _.typeAB.foo, _.typeAB.bar, _.typeC.typeA.foo))
)

@lihaoyi
Copy link
Member

lihaoyi commented Sep 30, 2024

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

@lolgab lolgab added the bug The issue represents an bug label Oct 7, 2024
@lefou
Copy link
Member

lefou commented Feb 8, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue represents an bug
Projects
None yet
Development

No branches or pull requests

4 participants