witty-crayon-22786
05/06/2020, 8:40 PMDirectoryDigest
/ Snapshot
, which would effectively be a HashMap<PathBuf, (File|Directory)>
to make those kinds of functions easier to write. currently we lazily load from the database, but i think that that has made a lot of things harder to implement efficiently.witty-crayon-22786
05/06/2020, 8:40 PMwitty-crayon-22786
05/06/2020, 8:41 PMmaterialize_directory
)witty-crayon-22786
05/06/2020, 8:41 PMhundreds-father-404
05/06/2020, 8:42 PMwitty-crayon-22786
05/06/2020, 8:43 PMmaterialize_directory
needed some love.witty-crayon-22786
05/06/2020, 8:44 PMwitty-crayon-22786
05/06/2020, 8:45 PMwitty-crayon-22786
05/06/2020, 8:49 PMSnapshot.path_stats
into a new Snapshot
via `Snapshot::from_path_stats`…witty-crayon-22786
05/06/2020, 8:49 PMhundreds-father-404
05/06/2020, 8:51 PMwitty-crayon-22786
05/06/2020, 8:53 PMSnapshot
is the in-memory representation of a merkle tree of `Digest`s in the databasewitty-crayon-22786
05/06/2020, 8:53 PMwitty-crayon-22786
05/06/2020, 8:54 PMhundreds-father-404
05/06/2020, 8:56 PMDigest
, then? We don’t cache the result of await Get[Digest](AddPrefix)
? We will cache the resulting Digest
in lmdb, but not that this particular AddDigest
request -> this particular output digest?witty-crayon-22786
05/06/2020, 8:57 PMwitty-crayon-22786
05/06/2020, 8:58 PMSnapshots
(effectively) in the database as a merkle tree (at least in part because it’s the remote exec format)witty-crayon-22786
05/06/2020, 8:59 PMwitty-crayon-22786
05/06/2020, 9:00 PMwitty-crayon-22786
05/06/2020, 9:00 PMDigest
-> Digest
… you can then grab the output Digest
(roughly, i’m paraphasing) and look it up in the store to get a snapshotwitty-crayon-22786
05/06/2020, 9:01 PMwitty-crayon-22786
05/06/2020, 9:02 PMwitty-crayon-22786
05/06/2020, 9:02 PMwitty-crayon-22786
05/06/2020, 9:03 PMNode
s are “memoized” in pantsd using the rust equivalent of eq
/`hash`witty-crayon-22786
05/06/2020, 9:04 PM