-
-
Notifications
You must be signed in to change notification settings - Fork 687
Open
Labels
Description
Describe the bug
Repository that reproduces the issue: https://github.com/mrdziuban/pants-scala-top-level-test
I setup a Pants build with two Scala files:
src/main/scala/example/Foo.scalawith contentspackage example val foo = "foo"
src/main/scala/example/Bar.scalawith contentspackage example val bar = foo
When I compile the project with pants check :: I get an error:
-- [E006] Not Found Error: main/scala/example/Bar.scala:2:10 -------------------
2 |val bar = foo
| ^^^
| Not found: fooHowever if I modify Foo.scala to place val foo inside an object then everything works properly, so I believe the problem has to do with the top-level definition.
Pants version
2.30.0
OS
MacOS, I haven't tested on Linux.