Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for empty sources for configured targets using `.get_attr("srcs…
…")` instead of `.sources()` Summary: It's not exactly clear to me what's the difference between `configured_target.sources()` and `configured_target.get_attr("srcs")`. My intuition is that the former should just be a flattened list of the latter, but apparently it's not in practice as indicated by [user report](https://fb.workplace.com/groups/pyreqa/permalink/9054752214614530/) -- the target being reported is `fbcode//thrift/lib/python/test:special_cases-python-types`. Asked on BXL group [here](https://fb.workplace.com/groups/617497306123691/permalink/1104965664043517/) but in the meantime I think we'll just go with the get_attr approach since [`srcs` is what was used to calculate library manifests](https://www.internalfb.com/code/fbsource/[316b867a4bea]/fbcode/buck2/prelude/python/python_library.bzl?lines=213&base=4dc2d9f67ecd3b31c6b5909d83be85180ec3d81a). This is still not 100% perfect, as we are not yet considering platform srcs. Some future work might be needed for that. Reviewed By: IanChilds Differential Revision: D67294119 fbshipit-source-id: 9e8c9e34d36ff963d9887a761fbd0133c35e8989
- Loading branch information