gtristan commented on code in PR #1997:
URL: https://github.com/apache/buildstream/pull/1997#discussion_r2055226450
##########
src/buildstream/plugins/sources/local.py:
##########
@@ -110,6 +110,9 @@ def init_workspace_directory(self, directory):
#
self.__do_stage(directory)
+ def collect_source_info(self):
+ return [SourceInfo(self.path, SourceInfoMedium.LOCAL,
SourceVersionType.DIGEST, self.get_unique_key())]
Review Comment:
This is interesting upon closer inspection.
It seems that the internal `Directory._get_size()` abstract method is
completely unused, while the `_artifact.py` class does *observe* this in
`Artifact.cache()`, it does to in a completely meaningless way, in order to
satisfy a local `size` variable which is later unused.
This whole thing leads me down an irrelevant trail of unused deadcode, only
to confirm that *indeed*, buildstream needs to download a directory digest and
crawl the merkle tree without having any foreknowledge of the size of the
entire merkle tree to be downloaded... finally observing the
`remote_execution.proto` `message Digest` proto definition tells me which size
would be appropriate to report in a `{hash}/{size}` version definition.
In conclusion, I will use the `size_bytes` member of the `Digest` proto,
rather than asking the `CasBasedDirectory._get_size()` to tell me what "size"
to put there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]