refactor(tvix/store/composition): rename 'default' to 'root'

This becomes the root of the composition. `default` implies we can
directly access anything else, which we cannot. `root` makes this more
understandable, and it's all internal only anyways.

Change-Id: I297511bc05a7c32c59510b9d192b40d1bd937b5f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12746
Reviewed-by: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2024-11-09 13:16:11 +00:00 committed by flokli
parent 8df919dcf0
commit d505f03e00
9 changed files with 26 additions and 26 deletions

View file

@ -145,15 +145,15 @@ pub async fn addrs_to_configs(
let path_info_service_url = Url::parse(&urls.path_info_service_addr)?;
configs.blobservices.insert(
"default".into(),
"root".into(),
with_registry(&REG, || blob_service_url.try_into())?,
);
configs.directoryservices.insert(
"default".into(),
"root".into(),
with_registry(&REG, || directory_service_url.try_into())?,
);
configs.pathinfoservices.insert(
"default".into(),
"root".into(),
with_registry(&REG, || path_info_service_url.try_into())?,
);
@ -194,9 +194,9 @@ pub async fn construct_services_from_configs(
comp.extend(configs.directoryservices);
comp.extend(configs.pathinfoservices);
let blob_service: Arc<dyn BlobService> = comp.build("default").await?;
let directory_service: Arc<dyn DirectoryService> = comp.build("default").await?;
let path_info_service: Arc<dyn PathInfoService> = comp.build("default").await?;
let blob_service: Arc<dyn BlobService> = comp.build("root").await?;
let directory_service: Arc<dyn DirectoryService> = comp.build("root").await?;
let path_info_service: Arc<dyn PathInfoService> = comp.build("root").await?;
// HACK: The grpc client also implements NarCalculationService, and we
// really want to use it (otherwise we'd need to fetch everything again for hashing).