https://pantsbuild.org/ logo
#development
Title
# development
f

fresh-cat-90827

05/25/2022, 4:03 PM
heads up for plugin developers — https://github.com/pantsbuild/pants/pull/15633 We would like plugin authors to provide custom examples of the files for the type of sources for a given target (in the
help
field of the
sources
field). Therefore, the default help message in the
MultipleSourcesField
has been removed. The integration test that loads all backends is modified to run
help-all
goal so that we can make sure that all plugins’ targets have own help defined, so the CI should catch those and of course if you run the tests locally. If I remove
help
attribute from a target’s class (e.g.
JavaTestsGeneratorSourcesField
), the test fails:
Copy code
$ ./pants test src/python/pants/init/load_backends_integration_test.py
...
15:00:28.26 [ERROR] type object 'JavaTestsGeneratorSourcesField' has no attribute 'help'
You can now be more specific with the help for a target, and in particular provide more language/system specific file examples. The update help messages are now visible in the
./pants help <target>
, e.g.
./pants help java_sources
and are going to be visible in the web help upon a new release.
w

wide-midnight-78598

05/25/2022, 4:06 PM
Silly question, are the default file extensions currently present in the docs or help?
CC_FILE_EXTENSIONS = (".c", ".h", ".cc", ".cpp", ".hpp")
f

fresh-cat-90827

05/25/2022, 4:08 PM
hey @wide-midnight-78598. No I don’t see them anywhere.
only the default file pattern
👍 1
image.png
h

hundreds-father-404

05/25/2022, 4:12 PM
Some target types like `file`/`resource` don't enforce certain file extensions,