about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-04-26T15·58+0300
committerflokli <flokli@flokli.de>2024-04-29T13·11+0000
commit26b77b2cf3138e4db236bf243b718f3de23b0529 (patch)
treecf68332103b7dad516e57cf3fc559c71eb02c1fb /tvix
parent69e4a7881843478916fc2b62d55bba66e393ad38 (diff)
refactor(tvix/glue): move decompression into fetchers/ subdir r/8026
This is specifically used for the fetcher code (only).
Moving it to there for now.

Change-Id: I1e1d0541b85340ef4ff3a4c6b3fa99b51853f539
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11532
Reviewed-by: edef <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix')
-rw-r--r--tvix/glue/src/fetchers/decompression.rs (renamed from tvix/glue/src/decompression.rs)6
-rw-r--r--tvix/glue/src/fetchers/mod.rs (renamed from tvix/glue/src/fetchers.rs)5
-rw-r--r--tvix/glue/src/lib.rs1
3 files changed, 7 insertions, 5 deletions
diff --git a/tvix/glue/src/decompression.rs b/tvix/glue/src/fetchers/decompression.rs
index 11dc9d98352a..f96fa60e34f7 100644
--- a/tvix/glue/src/decompression.rs
+++ b/tvix/glue/src/fetchers/decompression.rs
@@ -204,9 +204,9 @@ mod tests {
     }
 
     #[rstest]
-    #[case::gzip(include_bytes!("tests/blob.tar.gz"))]
-    #[case::bzip2(include_bytes!("tests/blob.tar.bz2"))]
-    #[case::xz(include_bytes!("tests/blob.tar.xz"))]
+    #[case::gzip(include_bytes!("../tests/blob.tar.gz"))]
+    #[case::bzip2(include_bytes!("../tests/blob.tar.bz2"))]
+    #[case::xz(include_bytes!("../tests/blob.tar.xz"))]
     #[tokio::test]
     async fn compressed_tar(#[case] data: &[u8]) {
         let reader = DecompressedReader::new(BufReader::new(data));
diff --git a/tvix/glue/src/fetchers.rs b/tvix/glue/src/fetchers/mod.rs
index 7560c447d8d2..4b53d0fdac60 100644
--- a/tvix/glue/src/fetchers.rs
+++ b/tvix/glue/src/fetchers/mod.rs
@@ -17,7 +17,10 @@ use tvix_castore::{
 use tvix_store::{pathinfoservice::PathInfoService, proto::PathInfo};
 use url::Url;
 
-use crate::{builtins::FetcherError, decompression::DecompressedReader};
+use crate::builtins::FetcherError;
+
+mod decompression;
+use decompression::DecompressedReader;
 
 /// Representing options for doing a fetch.
 #[derive(Clone, Eq, PartialEq)]
diff --git a/tvix/glue/src/lib.rs b/tvix/glue/src/lib.rs
index 8528f09e528c..2e5a3be103a1 100644
--- a/tvix/glue/src/lib.rs
+++ b/tvix/glue/src/lib.rs
@@ -6,7 +6,6 @@ pub mod tvix_build;
 pub mod tvix_io;
 pub mod tvix_store_io;
 
-mod decompression;
 #[cfg(test)]
 mod tests;