SIGN IN SIGN UP

deballast: count the consumer's imports roots for a dep's modules

A dep's module names were resolved only under the dep's own `imports` roots.
Bazel puts the consuming target's roots on PYTHONPATH for the whole runfiles
tree, so a dep src can be importable under a name that exists only there.
`//bazel/rules:console_scripts_gen` resolved to `bazel.rules.console_scripts_gen`
while its test, with `imports = ["."]`, does `from console_scripts_gen import
...` - reported as an unused dep as of the subsequent change.

Change-Id: Ib734623fe2483ef4dadb63dabc7f8e8a65d40f8b
J
Jörg Herbel committed
d985c3e52119a7031c349b20abf8aa1fcb78465e
Parent: d28d4a8
Committed by Jenkins <jenkins@review.lan.tribe29.com> on 8/24/2026, 9:06:49 AM