<#20959 Scala Dependency Inference ignores self-ty...
# github-notifications
c
#20959 Scala Dependency Inference ignores self-type annotations when they are in the same package. Issue created by alonsodomin Describe the bug Given the following Scala files: `src/scala/foo/Bar.scala`:
Copy code
package foo

trait Bar
and `src/scala/foo/Baz.scala`:
Copy code
package foo

trait Baz { self: Bar =>
}
Pants should be able to detect that there is a dependency from
src/scala/foo/Baz.scala
to
src/scala/foo/Bar.scala
as
Baz
is consuming the
Bar
trait as a self-type and both live in the same package. Pants version
2.21.0rc0
but also present in
main
OS both Additional info At the moment the Scala dependency inference parser ignores self-types so the dependency needs to added manually. pantsbuild/pants