some-farmer-97614
01/11/2019, 10:02 PMaloof-angle-91616
01/11/2019, 10:08 PMgenrule
-- see an example for cloc
, a script which counts lines of code using heuristics and regex: https://github.com/pantsbuild/pants/blob/f30c612f7b9c70e0b1f4cf234d8c9155a8b27508/src/python/pants/backend/graph_info/tasks/cloc.py#L77. we are currently rewriting the python support in v2 (along with many other things) so this functionality works, but the interface from v2 rules to the CLI is still being hashed out -- see the very very very very in-progress diff at https://github.com/pantsbuild/pants/pull/6880. what use case are you thinking of?some-farmer-97614
01/11/2019, 10:18 PMsome-farmer-97614
01/11/2019, 10:21 PMaloof-angle-91616
01/11/2019, 10:23 PMaloof-angle-91616
01/11/2019, 10:25 PMpants-plugins/
) in your repo which defines pants tasks, subsystems, targets, etc, and register it in your repo's pants.ini
file. you can then invoke your tasks as first-class citizens just like built-in pants tasks such as jvm and scala compilation tasks.aloof-angle-91616
01/11/2019, 10:27 PMgenrule
in the v1 model, but tasks can invoke subprocesses and rely on some automatic caching of output directories, described in the task development docs above.some-farmer-97614
01/11/2019, 10:28 PMaloof-angle-91616
01/11/2019, 10:31 PMaloof-angle-91616
01/11/2019, 10:31 PM