How would I go about using `adhoc_tool` with a bin...
# general
d
How would I go about using
adhoc_tool
with a binary that uses its own caching mechanism to avoid redoing work? The cache is both an output and an input to the binary; is there a way to model this? This is if I wanted to use Pants with another build system without rewriting that system in Pants. For a simple example, imagine Pants didn't have Go support, and I had a Python repo using Pants where I wanted to add a Go step that consumes files output by some Pants targets (e.g. protobuf codegen) and outputs files used by other Pants targets (e.g. by a
python_distribution
). If I wanted to do this quickly without writing my own plugin for the language, I'd want to just use the Go
system_binary
, but
go
, like many modern languages, has its own build system with a caching mechanism.
b
Pants has an internal mechanism for this (“named” or “append-only” caches), but I don’t think it’s exposed to adhoc_tool yet. Could you file a feature request issue?
d