high-yak-85899
05/20/2022, 6:14 PMGet(Digest, CreateDigest(...))
?high-yak-85899
05/20/2022, 6:17 PMPathGlobs
was what I was looking forhundreds-father-404
05/20/2022, 6:28 PMhigh-yak-85899
05/20/2022, 6:31 PMDigestContents
. Anything I should be aware of when using this?high-yak-85899
05/20/2022, 6:33 PMhundreds-father-404
05/20/2022, 6:44 PMsaw some interesting notes about caching related to DigestContentsHm you did? If you use
pants.engine.fs
, then you don't need to reason about caching - it does it for youhigh-yak-85899
05/20/2022, 6:46 PMAlthough the contents of the Digest are not memoized across `@rules` or across runs (each
request for `DigestContents` will load the file content from disk), this API should still
generally only be used for small inputs, since concurrency might mean that very many `@rule`s
are holding `DigestContents` simultaneously.
high-yak-85899
05/20/2022, 6:47 PMargv
for a process is determined from the FileContent
of my Digest
, would that process behavior still be cached?hundreds-father-404
05/20/2022, 6:57 PMProcess
will have changed, so the cache cannot be usedhigh-yak-85899
05/20/2022, 7:01 PMhigh-yak-85899
05/20/2022, 7:11 PMhundreds-father-404
05/20/2022, 7:11 PMhundreds-father-404
05/20/2022, 7:12 PMDigestContents
? It's often much faster and memory efficient to use Digest
high-yak-85899
05/20/2022, 7:14 PMhigh-yak-85899
05/20/2022, 7:15 PM@rule
that takes in a digest and spits out a process or something so that I only read in the contents if the digest has changedhundreds-father-404
05/20/2022, 7:16 PMDigest -> DigestContents
from before and only re-read when the file watcher says you need tohigh-yak-85899
05/20/2022, 7:16 PM