diff options
author | Florian Klink <flokli@flokli.de> | 2024-04-20T12·01+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-04-20T14·14+0000 |
commit | e9db0449e700154baee1470f914c3f09089442d0 (patch) | |
tree | 7a3a8a6772c2caceb35da852f0ebb2fc638cc463 /tvix/store | |
parent | c4cb099823dbd20f673b870b47e4fb27af6c139c (diff) |
refactor(tvix/castore/import): make module, split off fs and error r/7981
Move error types and filesystem-specific functions to a separate file, and keep the fs:: namespace in public exports. Change-Id: I5e9e83ad78d9aea38553fafc293d3e4f8c31a8c1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11486 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/store')
-rw-r--r-- | tvix/store/src/bin/tvix-store.rs | 2 | ||||
-rw-r--r-- | tvix/store/src/import.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index 1f172d65c62f..7e362576a1dc 100644 --- a/tvix/store/src/bin/tvix-store.rs +++ b/tvix/store/src/bin/tvix-store.rs @@ -17,7 +17,7 @@ use tracing::Level; use tracing_subscriber::EnvFilter; use tracing_subscriber::Layer; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; -use tvix_castore::import::ingest_path; +use tvix_castore::import::fs::ingest_path; use tvix_store::proto::NarInfo; use tvix_store::proto::PathInfo; diff --git a/tvix/store/src/import.rs b/tvix/store/src/import.rs index 5cff29a9e5b0..7b6aeb824ea6 100644 --- a/tvix/store/src/import.rs +++ b/tvix/store/src/import.rs @@ -1,7 +1,8 @@ use std::path::Path; use tracing::{debug, instrument}; use tvix_castore::{ - blobservice::BlobService, directoryservice::DirectoryService, proto::node::Node, B3Digest, + blobservice::BlobService, directoryservice::DirectoryService, import::fs::ingest_path, + proto::node::Node, B3Digest, }; use nix_compat::{ @@ -116,8 +117,7 @@ where DS: AsRef<dyn DirectoryService>, PS: AsRef<dyn PathInfoService>, { - let root_node = - tvix_castore::import::ingest_path(blob_service, directory_service, path.as_ref()).await?; + let root_node = ingest_path(blob_service, directory_service, path.as_ref()).await?; // Ask the PathInfoService for the NAR size and sha256 let (nar_size, nar_sha256) = path_info_service.as_ref().calculate_nar(&root_node).await?; |