From 6f85dbfc06c4fa96deb968cfeb7e98ba36e95043 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 9 Jun 2023 10:28:02 +0300 Subject: feat(tvix/store/pathinfosvc): add calculate_nar method Putting this in the PathInfoService trait makes much more sense, we can have direct control over where/how to cache the results in the implementation. This now requires each PathInfoService to hold pointers to BlobService and DirectoryService. Change-Id: I4faae780d43eae4beeb57bd5e190e6d1a5d3314e Reviewed-on: https://cl.tvl.fyi/c/depot/+/8724 Tested-by: BuildkiteCI Autosubmit: flokli Reviewed-by: tazjin --- tvix/cli/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tvix/cli') diff --git a/tvix/cli/src/main.rs b/tvix/cli/src/main.rs index 0a1794006de2..76e6d66298f5 100644 --- a/tvix/cli/src/main.rs +++ b/tvix/cli/src/main.rs @@ -73,7 +73,8 @@ fn interpret(code: &str, path: Option, args: &Args, explain: bool) -> b let blob_service = MemoryBlobService::default(); let directory_service = MemoryDirectoryService::default(); - let path_info_service = MemoryPathInfoService::default(); // TODO: update to pass in blob and directory svc + let path_info_service = + MemoryPathInfoService::new(Box::new(blob_service.clone()), directory_service.clone()); eval.io_handle = Box::new(tvix_io::TvixIO::new( known_paths.clone(), -- cgit 1.4.1