Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New data APIs 15: one query crate to rule them all #6036

Merged
merged 9 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ Update instructions:
|----------------------|--------------------------------------------------------------------------|
| re_entity_db | In-memory storage of Rerun entities |
| re_query | Querying data in the re_data_store |
| re_query_cache | Caching datastructures for re_query |
| re_types | The built-in Rerun data types, component types, and archetypes. |
| re_types_blueprint | The core traits and types that power Rerun's Blueprint sub-system. |
| re_log_encoding | Helpers for encoding and transporting Rerun log messages |
Expand Down
75 changes: 8 additions & 67 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ 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_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 }
re_sdk_comms = { path = "crates/re_sdk_comms", version = "=0.16.0-alpha.2", default-features = false }
Expand Down
6 changes: 2 additions & 4 deletions crates/re_data_ui/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ use std::sync::Arc;

use egui::NumExt;

use re_entity_db::{
external::re_query_cache::CachedLatestAtComponentResults, EntityPath, InstancePath,
};
use re_entity_db::{external::re_query::LatestAtComponentResults, EntityPath, InstancePath};
use re_types::ComponentName;
use re_ui::SyntaxHighlighting as _;
use re_viewer_context::{UiVerbosity, ViewerContext};
Expand All @@ -16,7 +14,7 @@ use crate::item_ui;
pub struct EntityLatestAtResults {
pub entity_path: EntityPath,
pub component_name: ComponentName,
pub results: Arc<CachedLatestAtComponentResults>,
pub results: Arc<LatestAtComponentResults>,
}

impl DataUi for EntityLatestAtResults {
Expand Down
4 changes: 2 additions & 2 deletions crates/re_data_ui/src/component_ui_registry.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use re_data_store::LatestAtQuery;
use re_entity_db::{external::re_query_cache::CachedLatestAtComponentResults, EntityDb};
use re_entity_db::{external::re_query::LatestAtComponentResults, EntityDb};
use re_log_types::{external::arrow2, EntityPath};
use re_types::external::arrow2::array::Utf8Array;
use re_viewer_context::{ComponentUiRegistry, UiVerbosity, ViewerContext};
Expand Down Expand Up @@ -62,7 +62,7 @@ fn fallback_component_ui(
_query: &LatestAtQuery,
db: &EntityDb,
_entity_path: &EntityPath,
component: &CachedLatestAtComponentResults,
component: &LatestAtComponentResults,
instance_key: &re_types::components::InstanceKey,
) {
// TODO(#5607): what should happen if the promise is still pending?
Expand Down
20 changes: 10 additions & 10 deletions crates/re_data_ui/src/editors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use egui::NumExt as _;
use re_data_store::LatestAtQuery;
use re_entity_db::{external::re_query_cache::CachedLatestAtComponentResults, EntityDb};
use re_entity_db::{external::re_query::LatestAtComponentResults, EntityDb};
use re_log_types::EntityPath;
use re_types::{
components::{
Expand All @@ -23,7 +23,7 @@ fn edit_color_ui(
db: &EntityDb,
entity_path: &EntityPath,
override_path: &EntityPath,
component: &CachedLatestAtComponentResults,
component: &LatestAtComponentResults,
instance_key: &re_types::components::InstanceKey,
) {
let current_color = component
Expand Down Expand Up @@ -66,7 +66,7 @@ fn edit_text_ui(
db: &EntityDb,
entity_path: &EntityPath,
override_path: &EntityPath,
component: &CachedLatestAtComponentResults,
component: &LatestAtComponentResults,
instance_key: &re_types::components::InstanceKey,
) {
let current_text = component
Expand Down Expand Up @@ -106,7 +106,7 @@ fn edit_name_ui(
db: &EntityDb,
entity_path: &EntityPath,
override_path: &EntityPath,
component: &CachedLatestAtComponentResults,
component: &LatestAtComponentResults,
instance_key: &re_types::components::InstanceKey,
) {
let current_text = component
Expand Down Expand Up @@ -147,7 +147,7 @@ fn edit_scatter_ui(
db: &EntityDb,
entity_path: &EntityPath,
override_path: &EntityPath,
component: &CachedLatestAtComponentResults,
component: &LatestAtComponentResults,
instance_key: &re_types::components::InstanceKey,
) {
let current_scatter = component
Expand Down Expand Up @@ -196,7 +196,7 @@ fn edit_radius_ui(
db: &EntityDb,
entity_path: &EntityPath,
override_path: &EntityPath,
component: &CachedLatestAtComponentResults,
component: &LatestAtComponentResults,
instance_key: &re_types::components::InstanceKey,
) {
let current_radius = component
Expand Down Expand Up @@ -243,7 +243,7 @@ fn edit_marker_shape_ui(
db: &EntityDb,
entity_path: &EntityPath,
override_path: &EntityPath,
component: &CachedLatestAtComponentResults,
component: &LatestAtComponentResults,
instance_key: &re_types::components::InstanceKey,
) {
let current_marker = component
Expand Down Expand Up @@ -329,7 +329,7 @@ fn edit_stroke_width_ui(
db: &EntityDb,
entity_path: &EntityPath,
override_path: &EntityPath,
component: &CachedLatestAtComponentResults,
component: &LatestAtComponentResults,
instance_key: &re_types::components::InstanceKey,
) {
let current_stroke_width = component
Expand Down Expand Up @@ -376,7 +376,7 @@ fn edit_marker_size_ui(
db: &EntityDb,
entity_path: &EntityPath,
override_path: &EntityPath,
component: &CachedLatestAtComponentResults,
component: &LatestAtComponentResults,
instance_key: &re_types::components::InstanceKey,
) {
let current_marker_size = component
Expand Down Expand Up @@ -425,7 +425,7 @@ fn register_editor<'a, C: Component + Loggable + 'static>(
&EntityDb,
&EntityPath,
&EntityPath,
&CachedLatestAtComponentResults,
&LatestAtComponentResults,
&re_types::components::InstanceKey,
),
) where
Expand Down
5 changes: 2 additions & 3 deletions crates/re_entity_db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ all-features = true
default = []

## Enable (de)serialization using serde.
serde = ["dep:serde", "dep:rmp-serde", "re_log_types/serde", "re_query/serde"]
serde = ["dep:serde", "dep:rmp-serde", "re_log_types/serde"]


[dependencies]
Expand All @@ -33,8 +33,7 @@ re_int_histogram.workspace = true
re_log.workspace = true
re_log_encoding = { workspace = true, features = ["decoder"] }
re_log_types.workspace = true
re_query.workspace = true
re_query_cache = { workspace = true, features = ["to_archetype"] }
re_query = { workspace = true, features = ["to_archetype"] }
re_smart_channel.workspace = true
re_tracing.workspace = true
re_types_core.workspace = true
Expand Down
Loading
Loading