melodic-wolf-31860
04/14/2022, 9:53 AM- src
- dir1
- subdir1
- script1.py
- subdir2
- script2.py
- BUILD
- dir2
- subdir3
- script3.py
- subdir4
- script4.py
- BUILD
Is it advisable to have a BUILD
file for each subdir as well? Given that we never intend to package/test the different subdirs separately?
I feel that having a BUILD
file at each subdir is unnecessary given we are happy with the defaults, and can be added later if we ever do intend to package/test/etc. those subdirs separately.refined-addition-53644
04/14/2022, 9:59 AMnarrow-vegetable-37489
04/14/2022, 10:00 AMcurved-television-6568
04/14/2022, 10:21 AMmelodic-wolf-31860
04/14/2022, 10:23 AMhappy-kitchen-89482
04/14/2022, 12:57 PMoverrides=
to override metadata on specific files. It's really up to you. Any choice you make should have no impact on performance, invalidation, caching and so on, since those happen at the file level anyway. TBH the recommendation of having one BUILD file per folder is a little outdated and reflects our personal preferences more than any deep-seated wisdom.happy-kitchen-89482
04/14/2022, 12:58 PMhundreds-father-404
04/14/2022, 1:52 PMTBH the recommendation of having one BUILD file per folder is a little outdated and reflects our personal preferences more than any deep-seated wisdom.Disagree. A lot of thought went into it in the past five months when designing Go https://github.com/pantsbuild/pants/issues/13488
enough-analyst-54434
04/14/2022, 6:50 PM