some-farmer-9761401/11/2019, 10:02 PM
aloof-angle-9161601/11/2019, 10:08 PM
-- see an example for
, 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-9761401/11/2019, 10:18 PM
aloof-angle-9161601/11/2019, 10:23 PM
) in your repo which defines pants tasks, subsystems, targets, etc, and register it in your repo's
file. you can then invoke your tasks as first-class citizens just like built-in pants tasks such as jvm and scala compilation tasks.
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-9761401/11/2019, 10:28 PM
aloof-angle-9161601/11/2019, 10:31 PM