diff options
author | Florian Klink <flokli@flokli.de> | 2024-06-16T13·00+0300 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2024-06-17T08·49+0000 |
commit | 71a29ceff42dd8e0266dec3811b242b3f5b4cb2f (patch) | |
tree | 010783e5d847796390118e099f7ba85c04e4055b /tvix/store/src | |
parent | 4be250109cb5df976cb137a3f631bc9f23faa952 (diff) |
docs(tvix/store/import): update import_path_as_nar_ca docstr r/8287
Change-Id: I697172220efe73b2a215185027df09f815d32627 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11846 Tested-by: BuildkiteCI Reviewed-by: Simon Hauser <simon.hauser@helsinki-systems.de>
Diffstat (limited to 'tvix/store/src')
-rw-r--r-- | tvix/store/src/import.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tvix/store/src/import.rs b/tvix/store/src/import.rs index 888380bca9a0..9d7a995581c8 100644 --- a/tvix/store/src/import.rs +++ b/tvix/store/src/import.rs @@ -102,8 +102,9 @@ pub fn derive_nar_ca_path_info( } } -/// Ingest the given path `path` and register the resulting output path in the -/// [`PathInfoService`] as a recursive fixed output NAR. +/// Ingest the contents at the given path `path` into castore, and registers the +/// resulting root node in the passed PathInfoService, using the "NAR sha256 +/// digest" and the passed name for output path calculation. #[instrument(skip_all, fields(store_name=name, path=?path), err)] pub async fn import_path_as_nar_ca<BS, DS, PS, NS, P>( path: P, @@ -137,7 +138,7 @@ where ) })?; - // assemble a new root_node with a name that is derived from the nar hash. + // rename the root node to match the calculated output path. let root_node = root_node.rename(output_path.to_string().into_bytes().into()); log_node(&root_node, path.as_ref()); @@ -150,7 +151,7 @@ where // This new [`PathInfo`] that we get back from there might contain additional signatures or // information set by the service itself. In this function, we silently swallow it because - // callers doesn't really need it. + // callers don't really need it. let _path_info = path_info_service.as_ref().put(path_info).await?; Ok(output_path.to_owned()) |