diff --git a/Cargo.lock b/Cargo.lock index f9703f346a2de..2ad62e1635145 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4310,7 +4310,6 @@ dependencies = [ "re_query", "re_query2", "re_query_cache", - "re_query_cache2", "re_smart_channel", "re_tracing", "re_types", @@ -4515,32 +4514,6 @@ dependencies = [ [[package]] name = "re_query_cache" version = "0.16.0-alpha.2" -dependencies = [ - "ahash", - "criterion", - "indent", - "itertools 0.12.0", - "mimalloc", - "parking_lot", - "paste", - "rand", - "re_data_store", - "re_format", - "re_log", - "re_log_types", - "re_query", - "re_tracing", - "re_types", - "re_types_core", - "seq-macro", - "similar-asserts", - "static_assertions", - "web-time", -] - -[[package]] -name = "re_query_cache2" -version = "0.16.0-alpha.2" dependencies = [ "ahash", "anyhow", @@ -4780,7 +4753,6 @@ dependencies = [ "re_log_types", "re_query", "re_query_cache", - "re_query_cache2", "re_renderer", "re_space_view", "re_tracing", @@ -4849,7 +4821,6 @@ dependencies = [ "re_log", "re_log_types", "re_query_cache", - "re_query_cache2", "re_renderer", "re_tracing", "re_types", @@ -4871,7 +4842,6 @@ dependencies = [ "re_log_types", "re_query", "re_query_cache", - "re_query_cache2", "re_renderer", "re_space_view", "re_tracing", @@ -5088,7 +5058,6 @@ dependencies = [ "re_log_types", "re_memory", "re_query_cache", - "re_query_cache2", "re_renderer", "re_smart_channel", "re_space_view", @@ -5150,7 +5119,6 @@ dependencies = [ "re_query", "re_query2", "re_query_cache", - "re_query_cache2", "re_renderer", "re_smart_channel", "re_string_interner", diff --git a/Cargo.toml b/Cargo.toml index 4172ba3c7f8c2..d391fc4bcab3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ re_log_encoding = { path = "crates/re_log_encoding", version = "=0.16.0-alpha.2" re_log_types = { path = "crates/re_log_types", version = "=0.16.0-alpha.2", default-features = false } re_memory = { path = "crates/re_memory", version = "=0.16.0-alpha.2", default-features = false } re_query = { path = "crates/re_query", version = "=0.16.0-alpha.2", default-features = false } -re_query_cache2 = { path = "crates/re_query_cache2", version = "=0.16.0-alpha.2", default-features = false } +re_query_cache = { path = "crates/re_query_cache", version = "=0.16.0-alpha.2", default-features = false } re_query2 = { path = "crates/re_query2", version = "=0.16.0-alpha.2", default-features = false } re_renderer = { path = "crates/re_renderer", version = "=0.16.0-alpha.2", default-features = false } re_sdk = { path = "crates/re_sdk", version = "=0.16.0-alpha.2", default-features = false } diff --git a/crates/re_data_ui/src/component.rs b/crates/re_data_ui/src/component.rs index e3961b0a17896..6c6e9a2fa4c67 100644 --- a/crates/re_data_ui/src/component.rs +++ b/crates/re_data_ui/src/component.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use egui::NumExt; use re_entity_db::{ - external::re_query_cache2::CachedLatestAtComponentResults, EntityPath, InstancePath, + external::re_query_cache::CachedLatestAtComponentResults, EntityPath, InstancePath, }; use re_types::ComponentName; use re_ui::SyntaxHighlighting as _; diff --git a/crates/re_data_ui/src/component_path.rs b/crates/re_data_ui/src/component_path.rs index 35af64c884300..79311a6182f26 100644 --- a/crates/re_data_ui/src/component_path.rs +++ b/crates/re_data_ui/src/component_path.rs @@ -25,7 +25,7 @@ impl DataUi for ComponentPath { )); } else { let results = - db.query_caches2() + db.query_caches() .latest_at(db.store(), query, entity_path, [*component_name]); if let Some(results) = results.components.get(component_name) { crate::EntityLatestAtResults { diff --git a/crates/re_data_ui/src/component_ui_registry.rs b/crates/re_data_ui/src/component_ui_registry.rs index 08b03de31dcf7..98e4afbf148d7 100644 --- a/crates/re_data_ui/src/component_ui_registry.rs +++ b/crates/re_data_ui/src/component_ui_registry.rs @@ -1,5 +1,5 @@ use re_data_store::LatestAtQuery; -use re_entity_db::{external::re_query_cache2::CachedLatestAtComponentResults, EntityDb}; +use re_entity_db::{external::re_query_cache::CachedLatestAtComponentResults, EntityDb}; use re_log_types::{external::arrow2, EntityPath}; use re_types::external::arrow2::array::Utf8Array; use re_viewer_context::{ComponentUiRegistry, UiVerbosity, ViewerContext}; diff --git a/crates/re_data_ui/src/editors.rs b/crates/re_data_ui/src/editors.rs index 425cbc28eecad..61b96d4eade1b 100644 --- a/crates/re_data_ui/src/editors.rs +++ b/crates/re_data_ui/src/editors.rs @@ -2,7 +2,7 @@ use egui::NumExt as _; use re_data_store::LatestAtQuery; -use re_entity_db::{external::re_query_cache2::CachedLatestAtComponentResults, EntityDb}; +use re_entity_db::{external::re_query_cache::CachedLatestAtComponentResults, EntityDb}; use re_log_types::EntityPath; use re_types::{ components::{ diff --git a/crates/re_data_ui/src/instance_path.rs b/crates/re_data_ui/src/instance_path.rs index a3369bc5a2b85..87155fa7ae464 100644 --- a/crates/re_data_ui/src/instance_path.rs +++ b/crates/re_data_ui/src/instance_path.rs @@ -76,7 +76,7 @@ impl DataUi for InstancePath { .num_columns(2) .show(ui, |ui| { for component_name in normal_components { - let results = db.query_caches2().latest_at( + let results = db.query_caches().latest_at( db.store(), query, entity_path, diff --git a/crates/re_entity_db/Cargo.toml b/crates/re_entity_db/Cargo.toml index 0b4bb51b6ad52..38e646d205a1e 100644 --- a/crates/re_entity_db/Cargo.toml +++ b/crates/re_entity_db/Cargo.toml @@ -35,8 +35,7 @@ re_log_encoding = { workspace = true, features = ["decoder"] } re_log_types.workspace = true re_query.workspace = true re_query2.workspace = true -re_query_cache.workspace = true -re_query_cache2 = { workspace = true, features = ["to_archetype"] } +re_query_cache = { workspace = true, features = ["to_archetype"] } re_smart_channel.workspace = true re_tracing.workspace = true re_types_core.workspace = true diff --git a/crates/re_entity_db/src/entity_db.rs b/crates/re_entity_db/src/entity_db.rs index 68de41faeb7a5..3027be02373ab 100644 --- a/crates/re_entity_db/src/entity_db.rs +++ b/crates/re_entity_db/src/entity_db.rs @@ -116,14 +116,11 @@ pub struct EntityDb { /// Stores all components for all entities for all timelines. data_store: DataStore, - /// Query caches for the data in [`Self::data_store`]. - query_caches: re_query_cache::Caches, - /// The active promise resolver for this DB. resolver: re_query2::PromiseResolver, /// Query caches for the data in [`Self::data_store`]. - query_caches2: re_query_cache2::Caches, + query_caches: re_query_cache::Caches, stats: IngestionStatistics, } @@ -136,7 +133,6 @@ impl EntityDb { DataStoreConfig::default(), ); let query_caches = re_query_cache::Caches::new(&data_store); - let query_caches2 = re_query_cache2::Caches::new(&data_store); Self { data_source: None, set_store_info: None, @@ -146,9 +142,8 @@ impl EntityDb { times_per_timeline: Default::default(), tree: crate::EntityTree::root(), data_store, - query_caches, resolver: re_query2::PromiseResolver::default(), - query_caches2, + query_caches, stats: IngestionStatistics::new(store_id), } } @@ -201,11 +196,6 @@ impl EntityDb { &self.query_caches } - #[inline] - pub fn query_caches2(&self) -> &re_query_cache2::Caches { - &self.query_caches2 - } - #[inline] pub fn resolver(&self) -> &re_query2::PromiseResolver { &self.resolver @@ -219,21 +209,21 @@ impl EntityDb { query: &re_data_store::LatestAtQuery, ) -> PromiseResult> where - re_query_cache2::CachedLatestAtResults: re_query_cache2::ToArchetype, + re_query_cache::CachedLatestAtResults: re_query_cache::ToArchetype, { - let results = self.query_caches2().latest_at( + let results = self.query_caches().latest_at( self.store(), query, entity_path, A::all_components().iter().copied(), // no generics! ); - use re_query_cache2::ToArchetype as _; + use re_query_cache::ToArchetype as _; match results.to_archetype(self.resolver()).flatten() { PromiseResult::Pending => PromiseResult::Pending, PromiseResult::Error(err) => { - if let Some(err) = err.downcast_ref::() { - if matches!(err, re_query_cache2::QueryError::PrimaryNotFound(_)) { + if let Some(err) = err.downcast_ref::() { + if matches!(err, re_query_cache::QueryError::PrimaryNotFound(_)) { return PromiseResult::Ready(None); } } @@ -248,8 +238,8 @@ impl EntityDb { &self, entity_path: &EntityPath, query: &re_data_store::LatestAtQuery, - ) -> Option> { - self.query_caches2().latest_at_component::( + ) -> Option> { + self.query_caches().latest_at_component::( self.store(), self.resolver(), entity_path, @@ -262,8 +252,8 @@ impl EntityDb { &self, entity_path: &EntityPath, query: &re_data_store::LatestAtQuery, - ) -> Option> { - self.query_caches2().latest_at_component_quiet::( + ) -> Option> { + self.query_caches().latest_at_component_quiet::( self.store(), self.resolver(), entity_path, @@ -276,8 +266,8 @@ impl EntityDb { &self, entity_path: &EntityPath, query: &re_data_store::LatestAtQuery, - ) -> Option<(EntityPath, re_query_cache2::CachedLatestAtMonoResult)> { - self.query_caches2() + ) -> Option<(EntityPath, re_query_cache::CachedLatestAtMonoResult)> { + self.query_caches() .latest_at_component_at_closest_ancestor::( self.store(), self.resolver(), @@ -477,7 +467,6 @@ impl EntityDb { let original_store_events = &[store_event]; self.times_per_timeline.on_events(original_store_events); self.query_caches.on_events(original_store_events); - self.query_caches2.on_events(original_store_events); let clear_cascade = self.tree.on_store_additions(original_store_events); // Second-pass: update the [`DataStore`] by applying the [`ClearCascade`]. @@ -487,7 +476,6 @@ impl EntityDb { let new_store_events = self.on_clear_cascade(clear_cascade); self.times_per_timeline.on_events(&new_store_events); self.query_caches.on_events(&new_store_events); - self.query_caches2.on_events(&new_store_events); let clear_cascade = self.tree.on_store_additions(&new_store_events); // Clears don't affect `Clear` components themselves, therefore we cannot have recursive @@ -643,15 +631,13 @@ impl EntityDb { times_per_timeline, tree, data_store: _, - query_caches, resolver: _, - query_caches2, + query_caches, stats: _, } = self; times_per_timeline.on_events(store_events); query_caches.on_events(store_events); - query_caches2.on_events(store_events); let store_events = store_events.iter().collect_vec(); let compacted = CompactedStoreEvents::new(&store_events); diff --git a/crates/re_entity_db/src/lib.rs b/crates/re_entity_db/src/lib.rs index 78a87c87a7d2d..92389cc07aeb8 100644 --- a/crates/re_entity_db/src/lib.rs +++ b/crates/re_entity_db/src/lib.rs @@ -44,7 +44,7 @@ pub use editable_auto_value::EditableAutoValue; pub mod external { pub use re_data_store; pub use re_query2; - pub use re_query_cache2; + pub use re_query_cache; } // ---------------------------------------------------------------------------- diff --git a/crates/re_query_cache2/Cargo.toml b/crates/re_query_cache/Cargo.toml similarity index 93% rename from crates/re_query_cache2/Cargo.toml rename to crates/re_query_cache/Cargo.toml index b8b67820c4ee6..d2bb57e25a221 100644 --- a/crates/re_query_cache2/Cargo.toml +++ b/crates/re_query_cache/Cargo.toml @@ -1,13 +1,12 @@ [package] -name = "re_query_cache2" +name = "re_query_cache" authors.workspace = true description = "Temporary crate meant to replace re_query_cache" edition.workspace = true homepage.workspace = true include.workspace = true license.workspace = true -# TODO(cmc): Replace re_query with this crate. Never publish this one. -publish = false +publish = true readme = "README.md" repository.workspace = true rust-version.workspace = true diff --git a/crates/re_query_cache2/README.md b/crates/re_query_cache/README.md similarity index 55% rename from crates/re_query_cache2/README.md rename to crates/re_query_cache/README.md index db850d204a04c..9886d43eb96ec 100644 --- a/crates/re_query_cache2/README.md +++ b/crates/re_query_cache/README.md @@ -1,5 +1,5 @@ -# re_query_cache2 +# re_query_cache Temporary crate for implementing the new cached data APIs. Not published. -Will replace `re_query_cache2` when ready. +Will replace `re_query_cache` when ready. diff --git a/crates/re_query_cache2/benches/flat_vec_deque.rs b/crates/re_query_cache/benches/flat_vec_deque.rs similarity index 99% rename from crates/re_query_cache2/benches/flat_vec_deque.rs rename to crates/re_query_cache/benches/flat_vec_deque.rs index f1dec8514b7de..d12e10293c0e3 100644 --- a/crates/re_query_cache2/benches/flat_vec_deque.rs +++ b/crates/re_query_cache/benches/flat_vec_deque.rs @@ -2,7 +2,7 @@ use criterion::{criterion_group, criterion_main, Criterion}; use itertools::Itertools as _; -use re_query_cache2::FlatVecDeque; +use re_query_cache::FlatVecDeque; // --- diff --git a/crates/re_query_cache2/benches/latest_at.rs b/crates/re_query_cache/benches/latest_at.rs similarity index 99% rename from crates/re_query_cache2/benches/latest_at.rs rename to crates/re_query_cache/benches/latest_at.rs index cbda2b8826b32..599c73726ef95 100644 --- a/crates/re_query_cache2/benches/latest_at.rs +++ b/crates/re_query_cache/benches/latest_at.rs @@ -7,7 +7,7 @@ use itertools::Itertools; use re_data_store::{DataStore, LatestAtQuery, StoreSubscriber}; use re_log_types::{entity_path, DataRow, EntityPath, RowId, TimeInt, TimeType, Timeline}; use re_query2::{clamped_zip_1x1, PromiseResolver}; -use re_query_cache2::{CachedLatestAtResults, Caches}; +use re_query_cache::{CachedLatestAtResults, Caches}; use re_types::{ archetypes::Points2D, components::{Color, InstanceKey, Position2D, Text}, diff --git a/crates/re_query_cache2/examples/latest_at.rs b/crates/re_query_cache/examples/latest_at.rs similarity index 98% rename from crates/re_query_cache2/examples/latest_at.rs rename to crates/re_query_cache/examples/latest_at.rs index c283aac83f0f0..e894e10b63a17 100644 --- a/crates/re_query_cache2/examples/latest_at.rs +++ b/crates/re_query_cache/examples/latest_at.rs @@ -4,7 +4,7 @@ use re_log_types::example_components::{MyColor, MyLabel, MyPoint, MyPoints}; use re_log_types::{build_frame_nr, DataRow, RowId, TimeType, Timeline}; use re_types_core::{Archetype as _, Loggable as _}; -use re_query_cache2::{ +use re_query_cache::{ clamped_zip_1x2, CachedLatestAtComponentResults, CachedLatestAtResults, PromiseResolver, PromiseResult, }; @@ -22,7 +22,7 @@ fn main() -> anyhow::Result<()> { let query = LatestAtQuery::latest(timeline); eprintln!("query:{query:?}"); - let caches = re_query_cache2::Caches::new(&store); + let caches = re_query_cache::Caches::new(&store); // First, get the results for this query. // diff --git a/crates/re_query_cache2/examples/latest_at_archetype.rs b/crates/re_query_cache/examples/latest_at_archetype.rs similarity index 94% rename from crates/re_query_cache2/examples/latest_at_archetype.rs rename to crates/re_query_cache/examples/latest_at_archetype.rs index 03931bdeb0811..94caab585ce25 100644 --- a/crates/re_query_cache2/examples/latest_at_archetype.rs +++ b/crates/re_query_cache/examples/latest_at_archetype.rs @@ -7,7 +7,7 @@ use re_types::{ }; use re_types_core::{Archetype as _, Loggable as _}; -use re_query_cache2::{clamped_zip_1x2, CachedLatestAtResults, PromiseResolver, PromiseResult}; +use re_query_cache::{clamped_zip_1x2, CachedLatestAtResults, PromiseResolver, PromiseResult}; // --- @@ -22,7 +22,7 @@ fn main() -> anyhow::Result<()> { let query = LatestAtQuery::latest(timeline); eprintln!("query:{query:?}"); - let caches = re_query_cache2::Caches::new(&store); + let caches = re_query_cache::Caches::new(&store); // First, get the results for this query. // @@ -37,7 +37,7 @@ fn main() -> anyhow::Result<()> { // Then make use of the `ToArchetype` helper trait in order to query, resolve, deserialize and // cache an entire archetype all at once. - use re_query_cache2::ToArchetype as _; + use re_query_cache::ToArchetype as _; let arch: Points2D = match results.to_archetype(&resolver).flatten() { PromiseResult::Pending => { diff --git a/crates/re_query_cache2/examples/range.rs b/crates/re_query_cache/examples/range.rs similarity index 98% rename from crates/re_query_cache2/examples/range.rs rename to crates/re_query_cache/examples/range.rs index 45d46093beb00..e9bef34822eb0 100644 --- a/crates/re_query_cache2/examples/range.rs +++ b/crates/re_query_cache/examples/range.rs @@ -4,7 +4,7 @@ use re_log_types::example_components::{MyColor, MyLabel, MyPoint, MyPoints}; use re_log_types::{build_frame_nr, DataRow, RowId, TimeRange, TimeType, Timeline}; use re_types_core::{Archetype as _, Loggable as _}; -use re_query_cache2::{ +use re_query_cache::{ clamped_zip_1x2, range_zip_1x2, CachedRangeComponentResults, CachedRangeResults, PromiseResolver, PromiseResult, }; @@ -22,7 +22,7 @@ fn main() -> anyhow::Result<()> { let query = RangeQuery::new(timeline, TimeRange::EVERYTHING); eprintln!("query:{query:?}"); - let caches = re_query_cache2::Caches::new(&store); + let caches = re_query_cache::Caches::new(&store); // First, get the raw results for this query. // diff --git a/crates/re_query_cache2/src/cache.rs b/crates/re_query_cache/src/cache.rs similarity index 96% rename from crates/re_query_cache2/src/cache.rs rename to crates/re_query_cache/src/cache.rs index 7f46b49dbfb0c..6ac7ee9ee433e 100644 --- a/crates/re_query_cache2/src/cache.rs +++ b/crates/re_query_cache/src/cache.rs @@ -134,6 +134,18 @@ impl Caches { range_per_cache_key: Default::default(), } } + + #[inline] + pub fn clear(&self) { + let Self { + store_id: _, + latest_at_per_cache_key, + range_per_cache_key, + } = self; + + latest_at_per_cache_key.write().clear(); + range_per_cache_key.write().clear(); + } } impl StoreSubscriber for Caches { diff --git a/crates/re_query_cache2/src/cache_stats.rs b/crates/re_query_cache/src/cache_stats.rs similarity index 100% rename from crates/re_query_cache2/src/cache_stats.rs rename to crates/re_query_cache/src/cache_stats.rs diff --git a/crates/re_query_cache2/src/flat_vec_deque.rs b/crates/re_query_cache/src/flat_vec_deque.rs similarity index 100% rename from crates/re_query_cache2/src/flat_vec_deque.rs rename to crates/re_query_cache/src/flat_vec_deque.rs diff --git a/crates/re_query_cache2/src/latest_at/helpers.rs b/crates/re_query_cache/src/latest_at/helpers.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/helpers.rs rename to crates/re_query_cache/src/latest_at/helpers.rs diff --git a/crates/re_query_cache2/src/latest_at/mod.rs b/crates/re_query_cache/src/latest_at/mod.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/mod.rs rename to crates/re_query_cache/src/latest_at/mod.rs diff --git a/crates/re_query_cache2/src/latest_at/query.rs b/crates/re_query_cache/src/latest_at/query.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/query.rs rename to crates/re_query_cache/src/latest_at/query.rs diff --git a/crates/re_query_cache2/src/latest_at/results.rs b/crates/re_query_cache/src/latest_at/results.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/results.rs rename to crates/re_query_cache/src/latest_at/results.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/.gitattributes b/crates/re_query_cache/src/latest_at/to_archetype/.gitattributes similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/.gitattributes rename to crates/re_query_cache/src/latest_at/to_archetype/.gitattributes diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/annotation_context.rs b/crates/re_query_cache/src/latest_at/to_archetype/annotation_context.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/annotation_context.rs rename to crates/re_query_cache/src/latest_at/to_archetype/annotation_context.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/arrows2d.rs b/crates/re_query_cache/src/latest_at/to_archetype/arrows2d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/arrows2d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/arrows2d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/arrows3d.rs b/crates/re_query_cache/src/latest_at/to_archetype/arrows3d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/arrows3d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/arrows3d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/asset3d.rs b/crates/re_query_cache/src/latest_at/to_archetype/asset3d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/asset3d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/asset3d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/background3d.rs b/crates/re_query_cache/src/latest_at/to_archetype/background3d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/background3d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/background3d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/bar_chart.rs b/crates/re_query_cache/src/latest_at/to_archetype/bar_chart.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/bar_chart.rs rename to crates/re_query_cache/src/latest_at/to_archetype/bar_chart.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/boxes2d.rs b/crates/re_query_cache/src/latest_at/to_archetype/boxes2d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/boxes2d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/boxes2d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/boxes3d.rs b/crates/re_query_cache/src/latest_at/to_archetype/boxes3d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/boxes3d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/boxes3d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/clear.rs b/crates/re_query_cache/src/latest_at/to_archetype/clear.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/clear.rs rename to crates/re_query_cache/src/latest_at/to_archetype/clear.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/container_blueprint.rs b/crates/re_query_cache/src/latest_at/to_archetype/container_blueprint.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/container_blueprint.rs rename to crates/re_query_cache/src/latest_at/to_archetype/container_blueprint.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/depth_image.rs b/crates/re_query_cache/src/latest_at/to_archetype/depth_image.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/depth_image.rs rename to crates/re_query_cache/src/latest_at/to_archetype/depth_image.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/disconnected_space.rs b/crates/re_query_cache/src/latest_at/to_archetype/disconnected_space.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/disconnected_space.rs rename to crates/re_query_cache/src/latest_at/to_archetype/disconnected_space.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/image.rs b/crates/re_query_cache/src/latest_at/to_archetype/image.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/image.rs rename to crates/re_query_cache/src/latest_at/to_archetype/image.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/line_strips2d.rs b/crates/re_query_cache/src/latest_at/to_archetype/line_strips2d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/line_strips2d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/line_strips2d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/line_strips3d.rs b/crates/re_query_cache/src/latest_at/to_archetype/line_strips3d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/line_strips3d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/line_strips3d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/mesh3d.rs b/crates/re_query_cache/src/latest_at/to_archetype/mesh3d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/mesh3d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/mesh3d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/mod.rs b/crates/re_query_cache/src/latest_at/to_archetype/mod.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/mod.rs rename to crates/re_query_cache/src/latest_at/to_archetype/mod.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/panel_blueprint.rs b/crates/re_query_cache/src/latest_at/to_archetype/panel_blueprint.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/panel_blueprint.rs rename to crates/re_query_cache/src/latest_at/to_archetype/panel_blueprint.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/pinhole.rs b/crates/re_query_cache/src/latest_at/to_archetype/pinhole.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/pinhole.rs rename to crates/re_query_cache/src/latest_at/to_archetype/pinhole.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/plot_legend.rs b/crates/re_query_cache/src/latest_at/to_archetype/plot_legend.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/plot_legend.rs rename to crates/re_query_cache/src/latest_at/to_archetype/plot_legend.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/points2d.rs b/crates/re_query_cache/src/latest_at/to_archetype/points2d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/points2d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/points2d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/points3d.rs b/crates/re_query_cache/src/latest_at/to_archetype/points3d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/points3d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/points3d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/scalar.rs b/crates/re_query_cache/src/latest_at/to_archetype/scalar.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/scalar.rs rename to crates/re_query_cache/src/latest_at/to_archetype/scalar.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/scalar_axis.rs b/crates/re_query_cache/src/latest_at/to_archetype/scalar_axis.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/scalar_axis.rs rename to crates/re_query_cache/src/latest_at/to_archetype/scalar_axis.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/segmentation_image.rs b/crates/re_query_cache/src/latest_at/to_archetype/segmentation_image.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/segmentation_image.rs rename to crates/re_query_cache/src/latest_at/to_archetype/segmentation_image.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/series_line.rs b/crates/re_query_cache/src/latest_at/to_archetype/series_line.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/series_line.rs rename to crates/re_query_cache/src/latest_at/to_archetype/series_line.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/series_point.rs b/crates/re_query_cache/src/latest_at/to_archetype/series_point.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/series_point.rs rename to crates/re_query_cache/src/latest_at/to_archetype/series_point.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/space_view_blueprint.rs b/crates/re_query_cache/src/latest_at/to_archetype/space_view_blueprint.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/space_view_blueprint.rs rename to crates/re_query_cache/src/latest_at/to_archetype/space_view_blueprint.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/space_view_contents.rs b/crates/re_query_cache/src/latest_at/to_archetype/space_view_contents.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/space_view_contents.rs rename to crates/re_query_cache/src/latest_at/to_archetype/space_view_contents.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/tensor.rs b/crates/re_query_cache/src/latest_at/to_archetype/tensor.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/tensor.rs rename to crates/re_query_cache/src/latest_at/to_archetype/tensor.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/text_document.rs b/crates/re_query_cache/src/latest_at/to_archetype/text_document.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/text_document.rs rename to crates/re_query_cache/src/latest_at/to_archetype/text_document.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/text_log.rs b/crates/re_query_cache/src/latest_at/to_archetype/text_log.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/text_log.rs rename to crates/re_query_cache/src/latest_at/to_archetype/text_log.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/transform3d.rs b/crates/re_query_cache/src/latest_at/to_archetype/transform3d.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/transform3d.rs rename to crates/re_query_cache/src/latest_at/to_archetype/transform3d.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/view_coordinates.rs b/crates/re_query_cache/src/latest_at/to_archetype/view_coordinates.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/view_coordinates.rs rename to crates/re_query_cache/src/latest_at/to_archetype/view_coordinates.rs diff --git a/crates/re_query_cache2/src/latest_at/to_archetype/viewport_blueprint.rs b/crates/re_query_cache/src/latest_at/to_archetype/viewport_blueprint.rs similarity index 100% rename from crates/re_query_cache2/src/latest_at/to_archetype/viewport_blueprint.rs rename to crates/re_query_cache/src/latest_at/to_archetype/viewport_blueprint.rs diff --git a/crates/re_query_cache2/src/lib.rs b/crates/re_query_cache/src/lib.rs similarity index 100% rename from crates/re_query_cache2/src/lib.rs rename to crates/re_query_cache/src/lib.rs diff --git a/crates/re_query_cache2/src/range/mod.rs b/crates/re_query_cache/src/range/mod.rs similarity index 100% rename from crates/re_query_cache2/src/range/mod.rs rename to crates/re_query_cache/src/range/mod.rs diff --git a/crates/re_query_cache2/src/range/query.rs b/crates/re_query_cache/src/range/query.rs similarity index 100% rename from crates/re_query_cache2/src/range/query.rs rename to crates/re_query_cache/src/range/query.rs diff --git a/crates/re_query_cache2/src/range/results.rs b/crates/re_query_cache/src/range/results.rs similarity index 100% rename from crates/re_query_cache2/src/range/results.rs rename to crates/re_query_cache/src/range/results.rs diff --git a/crates/re_query_cache2/tests/latest_at.rs b/crates/re_query_cache/tests/latest_at.rs similarity index 99% rename from crates/re_query_cache2/tests/latest_at.rs rename to crates/re_query_cache/tests/latest_at.rs index 016f1c3d5c808..b8ce810f7cc53 100644 --- a/crates/re_query_cache2/tests/latest_at.rs +++ b/crates/re_query_cache/tests/latest_at.rs @@ -9,7 +9,7 @@ use re_log_types::{ DataRow, EntityPath, RowId, TimePoint, }; use re_query2::PromiseResolver; -use re_query_cache2::Caches; +use re_query_cache::Caches; use re_types::Archetype as _; use re_types_core::{components::InstanceKey, Loggable as _}; diff --git a/crates/re_query_cache2/tests/range.rs b/crates/re_query_cache/tests/range.rs similarity index 99% rename from crates/re_query_cache2/tests/range.rs rename to crates/re_query_cache/tests/range.rs index d06a7a8d8b9ab..eb7380c8a1d06 100644 --- a/crates/re_query_cache2/tests/range.rs +++ b/crates/re_query_cache/tests/range.rs @@ -6,7 +6,7 @@ use re_log_types::{ example_components::{MyColor, MyPoint, MyPoints}, DataRow, EntityPath, RowId, TimePoint, }; -use re_query_cache2::{Caches, PromiseResolver, PromiseResult}; +use re_query_cache::{Caches, PromiseResolver, PromiseResult}; use re_types::{components::InstanceKey, Archetype}; use re_types_core::Loggable as _; diff --git a/crates/re_space_view/src/sub_archetypes.rs b/crates/re_space_view/src/sub_archetypes.rs index 1da0a8d04ab3d..ac58a457c5980 100644 --- a/crates/re_space_view/src/sub_archetypes.rs +++ b/crates/re_space_view/src/sub_archetypes.rs @@ -1,6 +1,6 @@ use re_data_store::LatestAtQuery; use re_entity_db::{ - external::re_query_cache2::{CachedLatestAtResults, PromiseResult, ToArchetype}, + external::re_query_cache::{CachedLatestAtResults, PromiseResult, ToArchetype}, EntityDb, }; use re_log_types::EntityPath; diff --git a/crates/re_space_view_dataframe/src/space_view_class.rs b/crates/re_space_view_dataframe/src/space_view_class.rs index b6189eb533128..06b619a9bc55c 100644 --- a/crates/re_space_view_dataframe/src/space_view_class.rs +++ b/crates/re_space_view_dataframe/src/space_view_class.rs @@ -160,7 +160,7 @@ impl SpaceViewClass for DataframeSpaceView { // TODO(#4466): make it explicit if that value results // from a splat joint. - let results = ctx.recording().query_caches2().latest_at( + let results = ctx.recording().query_caches().latest_at( ctx.recording_store(), &latest_at_query, &instance.entity_path, diff --git a/crates/re_space_view_spatial/Cargo.toml b/crates/re_space_view_spatial/Cargo.toml index 4f45589b01fc2..2bf7b47459146 100644 --- a/crates/re_space_view_spatial/Cargo.toml +++ b/crates/re_space_view_spatial/Cargo.toml @@ -28,7 +28,6 @@ re_log_types.workspace = true re_log.workspace = true re_query.workspace = true re_query_cache.workspace = true -re_query_cache2.workspace = true re_renderer = { workspace = true, features = [ "import-gltf", "import-obj", diff --git a/crates/re_space_view_spatial/src/visualizers/arrows2d.rs b/crates/re_space_view_spatial/src/visualizers/arrows2d.rs index 4f5792346a3ba..f7ed6472e5de8 100644 --- a/crates/re_space_view_spatial/src/visualizers/arrows2d.rs +++ b/crates/re_space_view_spatial/src/visualizers/arrows2d.rs @@ -1,5 +1,5 @@ use re_entity_db::{EntityPath, InstancePathHash}; -use re_query_cache2::range_zip_1x6; +use re_query_cache::range_zip_1x6; use re_renderer::{renderer::LineStripFlags, LineDrawableBuilder, PickingLayerInstanceId}; use re_types::{ archetypes::Arrows2D, diff --git a/crates/re_space_view_spatial/src/visualizers/arrows3d.rs b/crates/re_space_view_spatial/src/visualizers/arrows3d.rs index e5e61d400514d..05fdb1ef97649 100644 --- a/crates/re_space_view_spatial/src/visualizers/arrows3d.rs +++ b/crates/re_space_view_spatial/src/visualizers/arrows3d.rs @@ -1,5 +1,5 @@ use re_entity_db::{EntityPath, InstancePathHash}; -use re_query_cache2::range_zip_1x6; +use re_query_cache::range_zip_1x6; use re_renderer::{renderer::LineStripFlags, LineDrawableBuilder, PickingLayerInstanceId}; use re_types::{ archetypes::Arrows3D, diff --git a/crates/re_space_view_spatial/src/visualizers/boxes2d.rs b/crates/re_space_view_spatial/src/visualizers/boxes2d.rs index a22b9ed8ebf83..07fb7d9b9acdf 100644 --- a/crates/re_space_view_spatial/src/visualizers/boxes2d.rs +++ b/crates/re_space_view_spatial/src/visualizers/boxes2d.rs @@ -1,5 +1,5 @@ use re_entity_db::{EntityPath, InstancePathHash}; -use re_query_cache2::range_zip_1x6; +use re_query_cache::range_zip_1x6; use re_renderer::{LineDrawableBuilder, PickingLayerInstanceId}; use re_types::{ archetypes::Boxes2D, diff --git a/crates/re_space_view_spatial/src/visualizers/boxes3d.rs b/crates/re_space_view_spatial/src/visualizers/boxes3d.rs index 9df41ce522073..8819231a5aeaa 100644 --- a/crates/re_space_view_spatial/src/visualizers/boxes3d.rs +++ b/crates/re_space_view_spatial/src/visualizers/boxes3d.rs @@ -1,5 +1,5 @@ use re_entity_db::{EntityPath, InstancePathHash}; -use re_query_cache2::range_zip_1x7; +use re_query_cache::range_zip_1x7; use re_renderer::{LineDrawableBuilder, PickingLayerInstanceId}; use re_types::{ archetypes::Boxes3D, diff --git a/crates/re_space_view_spatial/src/visualizers/entity_iterator.rs b/crates/re_space_view_spatial/src/visualizers/entity_iterator.rs index c9eec8176a6c4..f63691dc37539 100644 --- a/crates/re_space_view_spatial/src/visualizers/entity_iterator.rs +++ b/crates/re_space_view_spatial/src/visualizers/entity_iterator.rs @@ -3,7 +3,7 @@ use re_data_store::{LatestAtQuery, RangeQuery}; use re_entity_db::{EntityDb, EntityProperties}; use re_log_types::{EntityPath, TimeInt, Timeline}; use re_query::{ArchetypeView, QueryError}; -use re_query_cache2::{CachedResults, ExtraQueryHistory}; +use re_query_cache::{CachedResults, ExtraQueryHistory}; use re_renderer::DepthOffset; use re_space_view::query_visual_history; use re_types::Archetype; @@ -54,7 +54,7 @@ pub fn query_archetype_with_history( let time_range = visible_history.time_range(*time); let store = entity_db.store(); - let caches = entity_db.query_caches2(); + let caches = entity_db.query_caches(); if !history.enabled || time_range.min() == time_range.max() { let latest_query = LatestAtQuery::new(*timeline, time_range.min()); diff --git a/crates/re_space_view_spatial/src/visualizers/lines2d.rs b/crates/re_space_view_spatial/src/visualizers/lines2d.rs index bca1670ef291c..e7c688eab4a7e 100644 --- a/crates/re_space_view_spatial/src/visualizers/lines2d.rs +++ b/crates/re_space_view_spatial/src/visualizers/lines2d.rs @@ -1,5 +1,5 @@ use re_entity_db::{EntityPath, InstancePathHash}; -use re_query_cache2::range_zip_1x5; +use re_query_cache::range_zip_1x5; use re_renderer::{LineDrawableBuilder, PickingLayerInstanceId}; use re_types::{ archetypes::LineStrips2D, diff --git a/crates/re_space_view_spatial/src/visualizers/lines3d.rs b/crates/re_space_view_spatial/src/visualizers/lines3d.rs index 442c38dd97247..9bbb657425f90 100644 --- a/crates/re_space_view_spatial/src/visualizers/lines3d.rs +++ b/crates/re_space_view_spatial/src/visualizers/lines3d.rs @@ -1,5 +1,5 @@ use re_entity_db::{EntityPath, InstancePathHash}; -use re_query_cache2::range_zip_1x5; +use re_query_cache::range_zip_1x5; use re_renderer::PickingLayerInstanceId; use re_types::{ archetypes::LineStrips3D, diff --git a/crates/re_space_view_spatial/src/visualizers/points2d.rs b/crates/re_space_view_spatial/src/visualizers/points2d.rs index 9fe4f1a690397..31bc5389316cc 100644 --- a/crates/re_space_view_spatial/src/visualizers/points2d.rs +++ b/crates/re_space_view_spatial/src/visualizers/points2d.rs @@ -1,7 +1,7 @@ use itertools::Itertools as _; use re_entity_db::{EntityPath, InstancePathHash}; -use re_query_cache2::range_zip_1x5; +use re_query_cache::range_zip_1x5; use re_renderer::{LineDrawableBuilder, PickingLayerInstanceId, PointCloudBuilder}; use re_types::{ archetypes::Points2D, diff --git a/crates/re_space_view_spatial/src/visualizers/points3d.rs b/crates/re_space_view_spatial/src/visualizers/points3d.rs index a0b62e66b1339..2d70126c2c5ba 100644 --- a/crates/re_space_view_spatial/src/visualizers/points3d.rs +++ b/crates/re_space_view_spatial/src/visualizers/points3d.rs @@ -1,7 +1,7 @@ use itertools::Itertools as _; use re_entity_db::{EntityPath, InstancePathHash}; -use re_query_cache2::range_zip_1x5; +use re_query_cache::range_zip_1x5; use re_renderer::{LineDrawableBuilder, PickingLayerInstanceId, PointCloudBuilder}; use re_types::{ archetypes::Points3D, diff --git a/crates/re_space_view_spatial/src/visualizers/results_ext.rs b/crates/re_space_view_spatial/src/visualizers/results_ext.rs index 5ef8526519645..25913ef25f9de 100644 --- a/crates/re_space_view_spatial/src/visualizers/results_ext.rs +++ b/crates/re_space_view_spatial/src/visualizers/results_ext.rs @@ -1,4 +1,4 @@ -use re_query_cache2::{ +use re_query_cache::{ CachedLatestAtResults, CachedRangeData, CachedRangeResults, CachedResults, PromiseResolver, PromiseResult, }; @@ -14,19 +14,19 @@ pub trait CachedRangeResultsExt { fn get_dense<'a, C: Component>( &'a self, resolver: &PromiseResolver, - ) -> Option>>; + ) -> Option>>; fn get_or_empty_dense<'a, C: Component>( &'a self, resolver: &PromiseResolver, - ) -> re_query_cache2::Result>; + ) -> re_query_cache::Result>; } impl CachedRangeResultsExt for CachedResults { fn get_dense<'a, C: Component>( &'a self, resolver: &PromiseResolver, - ) -> Option>> { + ) -> Option>> { match self { CachedResults::LatestAt(_, results) => results.get_dense(resolver), CachedResults::Range(_, results) => results.get_dense(resolver), @@ -36,7 +36,7 @@ impl CachedRangeResultsExt for CachedResults { fn get_or_empty_dense<'a, C: Component>( &'a self, resolver: &PromiseResolver, - ) -> re_query_cache2::Result> { + ) -> re_query_cache::Result> { match self { CachedResults::LatestAt(_, results) => results.get_or_empty_dense(resolver), CachedResults::Range(_, results) => results.get_or_empty_dense(resolver), @@ -49,20 +49,20 @@ impl CachedRangeResultsExt for CachedRangeResults { fn get_dense<'a, C: Component>( &'a self, resolver: &PromiseResolver, - ) -> Option>> { + ) -> Option>> { let results = self.get(C::name())?.to_dense(resolver); // TODO(#5607): what should happen if the promise is still pending? let (front_status, back_status) = results.status(); match front_status { PromiseResult::Error(err) => { - return Some(Err(re_query_cache2::QueryError::Other(err.into()))) + return Some(Err(re_query_cache::QueryError::Other(err.into()))) } PromiseResult::Pending | PromiseResult::Ready(_) => {} } match back_status { PromiseResult::Error(err) => { - return Some(Err(re_query_cache2::QueryError::Other(err.into()))) + return Some(Err(re_query_cache::QueryError::Other(err.into()))) } PromiseResult::Pending | PromiseResult::Ready(_) => {} } @@ -74,20 +74,20 @@ impl CachedRangeResultsExt for CachedRangeResults { fn get_or_empty_dense<'a, C: Component>( &'a self, resolver: &PromiseResolver, - ) -> re_query_cache2::Result> { + ) -> re_query_cache::Result> { let results = self.get_or_empty(C::name()).to_dense(resolver); // TODO(#5607): what should happen if the promise is still pending? let (front_status, back_status) = results.status(); match front_status { PromiseResult::Error(err) => { - return Err(re_query_cache2::QueryError::Other(err.into())) + return Err(re_query_cache::QueryError::Other(err.into())) } PromiseResult::Pending | PromiseResult::Ready(_) => {} } match back_status { PromiseResult::Error(err) => { - return Err(re_query_cache2::QueryError::Other(err.into())) + return Err(re_query_cache::QueryError::Other(err.into())) } PromiseResult::Pending | PromiseResult::Ready(_) => {} } @@ -101,7 +101,7 @@ impl CachedRangeResultsExt for CachedLatestAtResults { fn get_dense<'a, C: Component>( &'a self, resolver: &PromiseResolver, - ) -> Option>> { + ) -> Option>> { let results = self.get(C::name())?; let data = CachedRangeData::from_latest_at(resolver, results); @@ -109,13 +109,13 @@ impl CachedRangeResultsExt for CachedLatestAtResults { let (front_status, back_status) = data.status(); match front_status { PromiseResult::Error(err) => { - return Some(Err(re_query_cache2::QueryError::Other(err.into()))) + return Some(Err(re_query_cache::QueryError::Other(err.into()))) } PromiseResult::Pending | PromiseResult::Ready(_) => {} } match back_status { PromiseResult::Error(err) => { - return Some(Err(re_query_cache2::QueryError::Other(err.into()))) + return Some(Err(re_query_cache::QueryError::Other(err.into()))) } PromiseResult::Pending | PromiseResult::Ready(_) => {} } @@ -127,7 +127,7 @@ impl CachedRangeResultsExt for CachedLatestAtResults { fn get_or_empty_dense<'a, C: Component>( &'a self, resolver: &PromiseResolver, - ) -> re_query_cache2::Result> { + ) -> re_query_cache::Result> { let results = self.get_or_empty(C::name()); let data = CachedRangeData::from_latest_at(resolver, results); @@ -135,13 +135,13 @@ impl CachedRangeResultsExt for CachedLatestAtResults { let (front_status, back_status) = data.status(); match front_status { PromiseResult::Error(err) => { - return Err(re_query_cache2::QueryError::Other(err.into())) + return Err(re_query_cache::QueryError::Other(err.into())) } PromiseResult::Pending | PromiseResult::Ready(_) => {} } match back_status { PromiseResult::Error(err) => { - return Err(re_query_cache2::QueryError::Other(err.into())) + return Err(re_query_cache::QueryError::Other(err.into())) } PromiseResult::Pending | PromiseResult::Ready(_) => {} } diff --git a/crates/re_space_view_tensor/src/visualizer_system.rs b/crates/re_space_view_tensor/src/visualizer_system.rs index 9842a64a8e7fe..b22578d5da31b 100644 --- a/crates/re_space_view_tensor/src/visualizer_system.rs +++ b/crates/re_space_view_tensor/src/visualizer_system.rs @@ -1,5 +1,5 @@ use re_data_store::LatestAtQuery; -use re_entity_db::{external::re_query_cache2::CachedLatestAtMonoResult, EntityPath}; +use re_entity_db::{external::re_query_cache::CachedLatestAtMonoResult, EntityPath}; use re_log_types::RowId; use re_types::{archetypes::Tensor, components::TensorData, tensor_data::DecodedTensor}; use re_viewer_context::{ diff --git a/crates/re_space_view_text_log/Cargo.toml b/crates/re_space_view_text_log/Cargo.toml index f73a87deb47f0..d1343494859ec 100644 --- a/crates/re_space_view_text_log/Cargo.toml +++ b/crates/re_space_view_text_log/Cargo.toml @@ -25,7 +25,6 @@ re_entity_db.workspace = true re_log_types.workspace = true re_log.workspace = true re_query_cache.workspace = true -re_query_cache2.workspace = true re_renderer.workspace = true re_tracing.workspace = true re_types.workspace = true diff --git a/crates/re_space_view_text_log/src/visualizer_system.rs b/crates/re_space_view_text_log/src/visualizer_system.rs index c9cb50dffd7c3..a06212b65488e 100644 --- a/crates/re_space_view_text_log/src/visualizer_system.rs +++ b/crates/re_space_view_text_log/src/visualizer_system.rs @@ -1,7 +1,7 @@ use re_data_store::TimeRange; use re_entity_db::EntityPath; use re_log_types::{RowId, TimeInt}; -use re_query_cache2::{clamped_zip_1x2, range_zip_1x2, CachedRangeData, PromiseResult}; +use re_query_cache::{clamped_zip_1x2, range_zip_1x2, CachedRangeData, PromiseResult}; use re_types::{ archetypes::TextLog, components::{Color, Text, TextLogLevel}, @@ -57,7 +57,7 @@ impl VisualizerSystem for TextLogSystem { for data_result in view_query.iter_visible_data_results(ctx, Self::identifier()) { re_tracing::profile_scope!("primary", &data_result.entity_path.to_string()); - let results = ctx.recording().query_caches2().range( + let results = ctx.recording().query_caches().range( ctx.recording_store(), &query, &data_result.entity_path, @@ -129,16 +129,16 @@ impl VisualizerSystem for TextLogSystem { #[inline] fn check_range<'a, C: Component>( results: &'a CachedRangeData<'a, C>, -) -> re_query_cache2::Result<()> { +) -> re_query_cache::Result<()> { let (front_status, back_status) = results.status(); match front_status { PromiseResult::Pending => return Ok(()), - PromiseResult::Error(err) => return Err(re_query_cache2::QueryError::Other(err.into())), + PromiseResult::Error(err) => return Err(re_query_cache::QueryError::Other(err.into())), PromiseResult::Ready(_) => {} } match back_status { PromiseResult::Pending => return Ok(()), - PromiseResult::Error(err) => return Err(re_query_cache2::QueryError::Other(err.into())), + PromiseResult::Error(err) => return Err(re_query_cache::QueryError::Other(err.into())), PromiseResult::Ready(_) => {} } diff --git a/crates/re_space_view_time_series/Cargo.toml b/crates/re_space_view_time_series/Cargo.toml index 6a7f0691aba44..16faadc512663 100644 --- a/crates/re_space_view_time_series/Cargo.toml +++ b/crates/re_space_view_time_series/Cargo.toml @@ -25,7 +25,6 @@ re_log.workspace = true re_log_types.workspace = true re_query.workspace = true re_query_cache.workspace = true -re_query_cache2.workspace = true re_renderer.workspace = true re_space_view.workspace = true re_tracing.workspace = true diff --git a/crates/re_space_view_time_series/src/line_visualizer_system.rs b/crates/re_space_view_time_series/src/line_visualizer_system.rs index 83008a3f169eb..814f7369d2496 100644 --- a/crates/re_space_view_time_series/src/line_visualizer_system.rs +++ b/crates/re_space_view_time_series/src/line_visualizer_system.rs @@ -1,5 +1,5 @@ use itertools::Itertools as _; -use re_query_cache2::{PromiseResult, QueryError}; +use re_query_cache::{PromiseResult, QueryError}; use re_types::archetypes; use re_types::{ archetypes::SeriesLine, @@ -195,7 +195,7 @@ fn load_series( let entity_path = &data_result.entity_path; let query = re_data_store::RangeQuery::new(query.timeline, time_range); - let results = ctx.recording().query_caches2().range( + let results = ctx.recording().query_caches().range( ctx.recording_store(), &query, entity_path, @@ -259,7 +259,7 @@ fn load_series( .map(|index| (index, ())); let all_frames = - re_query_cache2::range_zip_1x1(all_scalars_indexed, all_colors.range_indexed()) + re_query_cache::range_zip_1x1(all_scalars_indexed, all_colors.range_indexed()) .enumerate(); for (i, (_index, _scalars, colors)) in all_frames { @@ -296,7 +296,7 @@ fn load_series( .range_indices(all_scalars_entry_range.clone()) .map(|index| (index, ())); - let all_frames = re_query_cache2::range_zip_1x1( + let all_frames = re_query_cache::range_zip_1x1( all_scalars_indexed, all_stroke_widths.range_indexed(), ) diff --git a/crates/re_space_view_time_series/src/point_visualizer_system.rs b/crates/re_space_view_time_series/src/point_visualizer_system.rs index 5aba1e13589c2..6b5b0c997ed79 100644 --- a/crates/re_space_view_time_series/src/point_visualizer_system.rs +++ b/crates/re_space_view_time_series/src/point_visualizer_system.rs @@ -1,6 +1,6 @@ use itertools::Itertools as _; -use re_query_cache2::{PromiseResult, QueryError}; +use re_query_cache::{PromiseResult, QueryError}; use re_types::{ archetypes::{self, SeriesPoint}, components::{Color, MarkerShape, MarkerSize, Name, Scalar}, @@ -149,7 +149,7 @@ impl SeriesPointSystem { let entity_path = &data_result.entity_path; let query = re_data_store::RangeQuery::new(query.timeline, time_range); - let results = ctx.recording().query_caches2().range( + let results = ctx.recording().query_caches().range( ctx.recording_store(), &query, entity_path, @@ -217,7 +217,7 @@ impl SeriesPointSystem { .range_indices(all_scalars_entry_range.clone()) .map(|index| (index, ())); - let all_frames = re_query_cache2::range_zip_1x1( + let all_frames = re_query_cache::range_zip_1x1( all_scalars_indexed, all_colors.range_indexed(), ) @@ -257,7 +257,7 @@ impl SeriesPointSystem { .range_indices(all_scalars_entry_range.clone()) .map(|index| (index, ())); - let all_frames = re_query_cache2::range_zip_1x1( + let all_frames = re_query_cache::range_zip_1x1( all_scalars_indexed, all_marker_sizes.range_indexed(), ) @@ -289,7 +289,7 @@ impl SeriesPointSystem { .range_indices(all_scalars_entry_range.clone()) .map(|index| (index, ())); - let all_frames = re_query_cache2::range_zip_1x1( + let all_frames = re_query_cache::range_zip_1x1( all_scalars_indexed, all_marker_shapes.range_indexed(), ) diff --git a/crates/re_types_builder/src/codegen/rust/to_archetype.rs b/crates/re_types_builder/src/codegen/rust/to_archetype.rs index 740f8ce97090a..fac93e1fed228 100644 --- a/crates/re_types_builder/src/codegen/rust/to_archetype.rs +++ b/crates/re_types_builder/src/codegen/rust/to_archetype.rs @@ -1,4 +1,4 @@ -//! Generates code in `re_query_cache2` so that cached results can easily be converted to +//! Generates code in `re_query_cache` so that cached results can easily be converted to //! ready-to-use archetypes. //! //! That code needs to be generated directly in the caching crates as it needs access to the cached @@ -35,7 +35,7 @@ fn generate_mod( files_to_write: &mut BTreeMap, ) { let generated_path = - Utf8PathBuf::from("crates/re_query_cache2/src/latest_at/to_archetype/mod.rs"); + Utf8PathBuf::from("crates/re_query_cache/src/latest_at/to_archetype/mod.rs"); let mut code = String::new(); code.push_str(&format!("// {}\n\n", crate::codegen::autogen_warning!())); @@ -62,7 +62,7 @@ fn generate_impls( objects: &Objects, files_to_write: &mut BTreeMap, ) { - let generated_path = Utf8PathBuf::from("crates/re_query_cache2/src/latest_at/to_archetype"); + let generated_path = Utf8PathBuf::from("crates/re_query_cache/src/latest_at/to_archetype"); let quoted_imports = quote! { use std::sync::Arc; diff --git a/crates/re_viewer/Cargo.toml b/crates/re_viewer/Cargo.toml index 51a91c3652770..2168bec9fe307 100644 --- a/crates/re_viewer/Cargo.toml +++ b/crates/re_viewer/Cargo.toml @@ -54,7 +54,6 @@ re_log_encoding = { workspace = true, features = [ re_log_types.workspace = true re_memory.workspace = true re_query_cache.workspace = true -re_query_cache2.workspace = true re_renderer = { workspace = true, default-features = false } re_smart_channel.workspace = true re_space_view.workspace = true diff --git a/crates/re_viewer/src/app.rs b/crates/re_viewer/src/app.rs index 58e2c612b7699..f86b135862412 100644 --- a/crates/re_viewer/src/app.rs +++ b/crates/re_viewer/src/app.rs @@ -691,7 +691,7 @@ impl App { #[cfg(not(target_arch = "wasm32"))] UICommand::PrintPrimaryCache => { if let Some(ctx) = store_context { - let text = format!("{:?}", ctx.recording.query_caches2()); + let text = format!("{:?}", ctx.recording.query_caches()); self.re_ui .egui_ctx .output_mut(|o| o.copied_text = text.clone()); diff --git a/crates/re_viewer/src/ui/memory_panel.rs b/crates/re_viewer/src/ui/memory_panel.rs index 36a89ef0e34ea..d60b680732b37 100644 --- a/crates/re_viewer/src/ui/memory_panel.rs +++ b/crates/re_viewer/src/ui/memory_panel.rs @@ -2,7 +2,7 @@ use itertools::Itertools; use re_data_store::{DataStoreConfig, DataStoreRowStats, DataStoreStats}; use re_format::{format_bytes, format_uint}; use re_memory::{util::sec_since_start, MemoryHistory, MemoryLimit, MemoryUse}; -use re_query_cache2::{CachedComponentStats, CachesStats}; +use re_query_cache::{CachedComponentStats, CachesStats}; use re_renderer::WgpuResourcePoolStatistics; use re_viewer_context::store_hub::StoreHubStats; diff --git a/crates/re_viewer/src/ui/override_ui.rs b/crates/re_viewer/src/ui/override_ui.rs index 5c34fdbbecea8..6ff2c4b7b794c 100644 --- a/crates/re_viewer/src/ui/override_ui.rs +++ b/crates/re_viewer/src/ui/override_ui.rs @@ -142,7 +142,7 @@ pub fn override_ui( let query = ctx.blueprint_query; ctx.store_context .blueprint - .query_caches2() + .query_caches() .latest_at(store, query, entity_path, [*component_name]) .components .get(component_name) @@ -150,7 +150,7 @@ pub fn override_ui( } StoreKind::Recording => { ctx.recording() - .query_caches2() + .query_caches() .latest_at( ctx.recording_store(), &query, diff --git a/crates/re_viewer_context/Cargo.toml b/crates/re_viewer_context/Cargo.toml index 16de5cba4b513..7a328f3578add 100644 --- a/crates/re_viewer_context/Cargo.toml +++ b/crates/re_viewer_context/Cargo.toml @@ -25,7 +25,6 @@ re_entity_db = { workspace = true, features = ["serde"] } re_log_types.workspace = true re_log.workspace = true re_query_cache.workspace = true -re_query_cache2.workspace = true re_query.workspace = true re_query2.workspace = true re_renderer.workspace = true diff --git a/crates/re_viewer_context/src/component_ui_registry.rs b/crates/re_viewer_context/src/component_ui_registry.rs index f687e5ec61682..85acff5c5f77c 100644 --- a/crates/re_viewer_context/src/component_ui_registry.rs +++ b/crates/re_viewer_context/src/component_ui_registry.rs @@ -2,7 +2,7 @@ use std::collections::BTreeMap; use re_data_store::LatestAtQuery; use re_entity_db::{ - external::re_query_cache2::CachedLatestAtComponentResults, EntityDb, EntityPath, + external::re_query_cache::CachedLatestAtComponentResults, EntityDb, EntityPath, }; use re_log_types::DataCell; use re_types::{components::InstanceKey, ComponentName, Loggable as _}; diff --git a/crates/re_viewer_context/src/store_hub.rs b/crates/re_viewer_context/src/store_hub.rs index 5c3a454babcdf..f90c08ee3611a 100644 --- a/crates/re_viewer_context/src/store_hub.rs +++ b/crates/re_viewer_context/src/store_hub.rs @@ -7,7 +7,7 @@ use re_data_store::StoreGeneration; use re_data_store::{DataStoreConfig, DataStoreStats}; use re_entity_db::{EntityDb, StoreBundle}; use re_log_types::{ApplicationId, StoreId, StoreKind}; -use re_query_cache2::CachesStats; +use re_query_cache::CachesStats; use crate::StoreContext; @@ -715,7 +715,7 @@ impl StoreHub { .unwrap_or_default(); let recording_cached_stats = recording - .map(|entity_db| entity_db.query_caches2().stats()) + .map(|entity_db| entity_db.query_caches().stats()) .unwrap_or_default(); let recording_config = recording diff --git a/examples/rust/extend_viewer_ui/src/main.rs b/examples/rust/extend_viewer_ui/src/main.rs index f7cb1533392e8..883ca0bdd3160 100644 --- a/examples/rust/extend_viewer_ui/src/main.rs +++ b/examples/rust/extend_viewer_ui/src/main.rs @@ -150,7 +150,7 @@ fn component_ui( // just show the last value logged for each component: let query = re_data_store::LatestAtQuery::latest(timeline); - let results = entity_db.query_caches2().latest_at( + let results = entity_db.query_caches().latest_at( entity_db.store(), &query, entity_path, diff --git a/scripts/lint.py b/scripts/lint.py index f2f4cad8073d9..51cf334d17dbe 100755 --- a/scripts/lint.py +++ b/scripts/lint.py @@ -980,7 +980,7 @@ def lint_crate_docs(should_ignore: Callable[[Any], bool]) -> int: """Make sure ARCHITECTURE.md talks about every single crate we have.""" # These crates will replace existing ones and won't ever be published as-is. - tmp_crates = ["re_query2", "re_query_cache2"] + tmp_crates = ["re_query2"] crates_dir = Path("crates") architecture_md_file = Path("ARCHITECTURE.md")