proud-dentist-22844
07/22/2021, 4:08 PMdisambiguate target. If there are multiple source roots that each contain a tests.fixtures package, for example, maybe we could do something like disambiguate(packages={"tests.fixtures": "./fixtures/"}) . Or even, add another arg to python_library like python_library(disambiguate={"tests.fixtures": "./fixtures/"}) so that anything in that target that imports something from tests.fixtures would use the ./fixtures/ as the dependency. And any files that do not depend on tests.fixtures would not get a hard-coded dependency on it (as with python_library(dependencies=…)).
Basically, an extra knob to tune dependency inference without requiring hard-coded dependencies.hundreds-father-404
07/22/2021, 6:55 PMhundreds-father-404
07/22/2021, 6:56 PMproud-dentist-22844
07/22/2021, 9:48 PMdisambiguate is a target, then I would hope that it would apply to at least all of the targets in the current BUILD file. Bonus points if there's a way to apply that to sub directories as well.proud-dentist-22844
07/22/2021, 9:49 PMdisambiguate is only an extra arg on python_library or python_test and friends, then I would expect to define it on every instance of python_library or python_test (like dependencies)