Is it possible to make pants spit out some sort of...
# development
p
Is it possible to make pants spit out some sort of understandable representation of what goes into a cache hash key so that I can actually inspect the differences when there is a cache miss?
f
Not easily. You can enable debug logging to see what
Process
dataclass instances are generated for each build action. Those are encoded (as per Remote Execution API "REAPI") into REAPI
Command
and
Action
protobufs and then hashed with SHA-256.
That hash is the cache key.
Or in REAPI terminology: a "digest"
p
How hard do you think it would be to add that sort of logging to the cache key computation? Ideally I would like to get a tree of dependencies
f
Logging the
Process
struct?