-
-
Notifications
You must be signed in to change notification settings - Fork 286
Open
Labels
dep-trackingStrict/unused deps, label collections related issuesStrict/unused deps, label collections related issues
Description
Unused dependency checker gives false positives when _suite macros are involved. Let's consider:
scala_library_suite(
name = "foo",
srcs = ["A.scala", "B.scala"],
deps = ["dep1", "dep2"],
)
A.scala depends on dep1 and B.scala depends on dep2. In this scenario, both dep1 and dep2 will be reported as unused. It's because _suite is expanded into several targets with deps copied to each of them.
Users' expectation here is that dependency is reported as an unused only when it's not used in all srcs from the suite but now it's reported if it's unused in some source from the suite. Fixing this would require a post-processing step that takes union of deps information from all expanded targets of the suite.
Metadata
Metadata
Assignees
Labels
dep-trackingStrict/unused deps, label collections related issuesStrict/unused deps, label collections related issues