fresh-cat-90827
01/24/2023, 9:45 PMfresh-cat-90827
01/24/2023, 9:45 PM@rule
async def infer_special_dependencies(request: InferSpecialDependenciesRequest) -> InferredDependencies:
logger.warning(request)
owners = await Get(Owners, OwnersRequest(("helloworld/translator/foobar.py",)))
logger.warning(owners)
return InferredDependencies(include=owners)
I have a POC working in Pants when I extend the python-infer subsystem adding a new option "ignored_paths" to not raise issues for those modules, but was wondering if it could be achieved with a plugin code instead.
I have also found quite a few other ways to address this problem (letting Pants inferring a dependency with the help of another target), but again it would be neat to be able to hook into the inference process.
Has anyone done anything vaguely similar?