high-yak-85899
01/21/2022, 12:54 AMprotobuf_sources
scattered under a tree and I need to bring them all in as a dependency for a python_source
.hundreds-father-404
01/21/2022, 1:00 AMf.proto
maps to f_pb2.py
. A major benefit of this approach is that it has file-level granularity—Pants will only generate the files that are actually needed, and it will cache each of those generations
But, you might need to set up source roots still https://www.pantsbuild.org/docs/source-rootshundreds-father-404
01/21/2022, 1:02 AMtarget()
as a "bag of dependencies". You add everything you want to the dependencies
of this target()
, and then when you depend on that target()
you'll transitively pull everything in. https://www.pantsbuild.org/docs/reference-targethigh-yak-85899
01/21/2022, 1:02 AMprotobuf_sources
as a dependency, it doesn't get picked up because there's nothing for pants to infer.