witty-crayon-22786
01/13/2022, 6:08 PMimmutable_input_digests
api before we lean in further on porting things to use itwitty-crayon-22786
01/13/2022, 6:09 PMwitty-crayon-22786
01/13/2022, 6:10 PMinput_digest: Digest
immutable_paths: set[str]
witty-crayon-22786
01/13/2022, 6:11 PMfast-nail-55400
01/13/2022, 6:15 PMMergeDigests
though on the all of the digests regardless though?fast-nail-55400
01/13/2022, 6:16 PMfast-nail-55400
01/13/2022, 6:17 PMDirectory
proto shouldn’t be too much of a performance issuefast-nail-55400
01/13/2022, 6:17 PMhundreds-father-404
01/13/2022, 6:23 PMwitty-crayon-22786
01/13/2022, 6:25 PMthat would require runningyes, but we do anyway inthough on the all of the digests regardless though?MergeDigests
InputDigests
to validate that there are no collisionswitty-crayon-22786
01/13/2022, 6:25 PMwitty-crayon-22786
01/13/2022, 6:26 PMhundreds-father-404
01/13/2022, 6:26 PMoutput_paths
field?witty-crayon-22786
01/13/2022, 6:27 PMwitty-crayon-22786
01/13/2022, 6:27 PMwitty-crayon-22786
01/13/2022, 7:12 PMwitty-crayon-22786
01/13/2022, 7:13 PMfast-nail-55400
01/13/2022, 7:15 PMhundreds-father-404
01/13/2022, 7:28 PMhundreds-father-404
01/19/2022, 11:03 PM<http://local.rs:prepare_workdir|local.rs:prepare_workdir>
.
We'd need to subset the `input_digest`: partition into mutable vs immutable, right? And then store.materialize_directory()
as we do now on the mutable digest, but still symlink()
on each immutable_path
?
If that's the case, I'm confused how we handle multiple distinct immutable input digests. My read of <http://immutable_inputs.rs|immutable_inputs.rs>
is that we intentionally separate out distinct digests like __toolcp
vs __processorcp
, which each get their own path()
. Those each might have n files, but they're grouped by that digest's same path()
to the dir. We'd need to start having one path-per-file iiuc, as we no longer can group related files since it's a flattened list?witty-crayon-22786
01/19/2022, 11:55 PMWe’d need to subset the `input_digest`: partition into mutable vs immutable, right? And thenno need to subset inas we do now on the mutable digest, but stillstore.materialize_directory()
on eachsymlink()
?immutable_path
input_digest
i don’t think. because materialize_directory
will take the whole digest, and then symlink on a case-by-case basiswitty-crayon-22786
01/19/2022, 11:56 PMIf that’s the case, I’m confused how we handle multiple distinct immutable input digests. My read ofwe wouldn’t have multiple distinct immutable input digests anymore: we’d go back to justis that we intentionally separate out distinct digests like<http://immutable_inputs.rs|immutable_inputs.rs>
vs__toolcp
, which each get their own__processorcp
.path()
input_digest
witty-crayon-22786
01/19/2022, 11:57 PMwitty-crayon-22786
01/19/2022, 11:57 PMhundreds-father-404
01/19/2022, 11:59 PMimmutable_dir
is symlinked? Meaning, we do not need to change to processing per-file. We can still do per-directory
And then is it everything in and under eachifis symlinked?immutable_dir
input_digest
has a/f1.txt
, a/f2.txt
, a/sub/f.txt
, and b/f.txt
, and you have immutable_dirs=['a']
, then materialize_directory
will see to symlink a/f1.txt
, a/f2.txt
, and a/sub/f.txt
together?witty-crayon-22786
01/20/2022, 12:58 AMAnd then is it everything in and under eachwhen you symlink a path, you’re done operating under that path, because all of the content under that path is provided (immutably) by the symlinkis symlinked?immutable_dir
witty-crayon-22786
01/20/2022, 12:59 AMa
hundreds-father-404
01/20/2022, 1:01 AMwitty-crayon-22786
01/20/2022, 1:01 AMmaterialize_directory
operates recursively. when you hit the path in question, you would symlink, and then not recurse any furtherwitty-crayon-22786
01/20/2022, 1:06 AMmaterialize_directory
will be checking for paths that it should symlink, but it won’t know know the digest to symlink until here: https://github.com/pantsbuild/pants/blob/e77191184f66e866a7282f21f40f6ad652566d62/src/rust/engine/fs/store/src/lib.rs#L993-L997hundreds-father-404
01/24/2022, 5:36 PMwitty-crayon-22786
01/24/2022, 5:36 PMhundreds-father-404
01/24/2022, 5:39 PM