about summary refs log tree commit diff
path: root/tvix/castore/src
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-11-09T13·33+0000
committerflokli <flokli@flokli.de>2024-11-11T18·46+0000
commite71a857ec892f14ee7ce318f6753ba4af8d5ca4e (patch)
tree9a71fce982ec64c8f7dd8484722fe31fd6785446 /tvix/castore/src
parentd505f03e005b87d315694a22a75c11205266ba7d (diff)
refactor(tvix/[ca]store): rename store composition feature flags r/8900
tvix-castore already supports composition without any additional feature
flags, the only thing that can be explicitly enabled is referring to
other stores via an anonymous url. Rename that feature flag to
"xp-composition-url-refs".

tvix-store effectively only controls the CLI surface, so rename this to
"xp-composition-cli".

The "store" in the feature name was dropped, as it's already apparent
from being in the tvix-[ca]store crate.

Change-Id: I1175dc6280cbba4cbcdfb7fd4b35fce713b45fc4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12747
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
Diffstat (limited to 'tvix/castore/src')
-rw-r--r--tvix/castore/src/composition.rs6
-rw-r--r--tvix/castore/src/directoryservice/from_addr.rs4
2 files changed, 5 insertions, 5 deletions
diff --git a/tvix/castore/src/composition.rs b/tvix/castore/src/composition.rs
index c6fa1ce64ac4..c3b6222d5d86 100644
--- a/tvix/castore/src/composition.rs
+++ b/tvix/castore/src/composition.rs
@@ -89,7 +89,7 @@
 //!
 //! Continue with Example 2, with my_registry instead of REG
 //!
-//! EXPERIMENTAL: If the xp-store-composition feature is enabled,
+//! EXPERIMENTAL: If the xp-composition-url-refs feature is enabled,
 //! entrypoints can also be URL strings, which are created as
 //! anonymous stores. Instantiations of the same URL will
 //! result in a new, distinct anonymous store each time, so creating
@@ -315,7 +315,7 @@ impl<'a> CompositionContext<'a> {
         Ok(self.build_internal(entrypoint).await?)
     }
 
-    #[cfg(feature = "xp-store-composition")]
+    #[cfg(feature = "xp-composition-url-refs")]
     async fn build_anonymous<T: ?Sized + Send + Sync + 'static>(
         &self,
         entrypoint: String,
@@ -330,7 +330,7 @@ impl<'a> CompositionContext<'a> {
         &self,
         entrypoint: String,
     ) -> BoxFuture<'_, Result<Arc<T>, CompositionError>> {
-        #[cfg(feature = "xp-store-composition")]
+        #[cfg(feature = "xp-composition-url-refs")]
         if entrypoint.contains("://") {
             // There is a chance this is a url. we are building an anonymous store
             return Box::pin(async move {
diff --git a/tvix/castore/src/directoryservice/from_addr.rs b/tvix/castore/src/directoryservice/from_addr.rs
index 2f7fc6d7de5a..d50b5a35dd03 100644
--- a/tvix/castore/src/directoryservice/from_addr.rs
+++ b/tvix/castore/src/directoryservice/from_addr.rs
@@ -89,12 +89,12 @@ mod tests {
     #[case::grpc_invalid_host_and_path("grpc+http://localhost/some-path", false)]
     /// A valid example for store composition using anonymous urls
     #[cfg_attr(
-        feature = "xp-store-composition",
+        feature = "xp-composition-url-refs",
         case::anonymous_url_composition("cache://?near=memory://&far=memory://", true)
     )]
     /// Store composition with anonymous urls should fail if the feature is disabled
     #[cfg_attr(
-        not(feature = "xp-store-composition"),
+        not(feature = "xp-composition-url-refs"),
         case::anonymous_url_composition("cache://?near=memory://&far=memory://", false)
     )]
     /// A valid example for Bigtable