Skip to content

Commit

Permalink
Merge branch 'main' into jan/error-notification-panel
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazk authored Dec 20, 2024
2 parents f6d73f1 + 7596891 commit ff866d1
Show file tree
Hide file tree
Showing 652 changed files with 3,029 additions and 2,703 deletions.
3 changes: 2 additions & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ Update instructions:
| Crate | Description |
|--------------------|--------------------------------------------------------------------------------------|
| re_analytics | Rerun's analytics SDK |
| re_capabilities | Capability tokens |
| re_byte_size | Calculate the heap-allocated size of values at runtime |
| re_capabilities | Capability tokens |
| re_case | Case conversions, the way Rerun likes them |
| re_crash_handler | Detect panics and signals, logging them and optionally sending them to analytics. |
| re_error | Helpers for handling errors. |
Expand Down
45 changes: 33 additions & 12 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5605,6 +5605,17 @@ dependencies = [
"walkdir",
]

[[package]]
name = "re_byte_size"
version = "0.22.0-alpha.1+dev"
dependencies = [
"arrow",
"half",
"re_arrow2",
"re_tuid",
"smallvec",
]

[[package]]
name = "re_capabilities"
version = "0.22.0-alpha.1+dev"
Expand Down Expand Up @@ -5637,6 +5648,7 @@ dependencies = [
"nohash-hasher",
"rand",
"re_arrow2",
"re_byte_size",
"re_error",
"re_format",
"re_format_arrow",
Expand Down Expand Up @@ -5667,6 +5679,7 @@ dependencies = [
"parking_lot",
"rand",
"re_arrow2",
"re_byte_size",
"re_chunk",
"re_format",
"re_log",
Expand All @@ -5689,6 +5702,7 @@ dependencies = [
"egui",
"egui_extras",
"itertools 0.13.0",
"re_byte_size",
"re_chunk_store",
"re_format",
"re_log_types",
Expand All @@ -5701,9 +5715,14 @@ dependencies = [
name = "re_component_ui"
version = "0.22.0-alpha.1+dev"
dependencies = [
"arrow",
"egui",
"egui_extras",
"egui_kittest",
"egui_plot",
"itertools 0.13.0",
"nohash-hasher",
"re_byte_size",
"re_data_source",
"re_data_ui",
"re_format",
Expand Down Expand Up @@ -5810,6 +5829,7 @@ dependencies = [
"image",
"itertools 0.13.0",
"nohash-hasher",
"re_byte_size",
"re_capabilities",
"re_chunk_store",
"re_entity_db",
Expand Down Expand Up @@ -5893,6 +5913,7 @@ dependencies = [
"parking_lot",
"rand",
"re_build_info",
"re_byte_size",
"re_chunk",
"re_chunk_store",
"re_format",
Expand Down Expand Up @@ -6029,6 +6050,7 @@ dependencies = [
"num-traits",
"re_arrow2",
"re_build_info",
"re_byte_size",
"re_format",
"re_log",
"re_protos",
Expand Down Expand Up @@ -6129,6 +6151,7 @@ dependencies = [
"paste",
"rand",
"re_arrow2",
"re_byte_size",
"re_chunk",
"re_chunk_store",
"re_error",
Expand Down Expand Up @@ -6260,6 +6283,7 @@ dependencies = [
"re_arrow2",
"re_build_info",
"re_build_tools",
"re_byte_size",
"re_chunk",
"re_chunk_store",
"re_data_loader",
Expand Down Expand Up @@ -6297,6 +6321,7 @@ dependencies = [
name = "re_selection_panel"
version = "0.22.0-alpha.1+dev"
dependencies = [
"arrow",
"egui",
"egui_tiles",
"itertools 0.13.0",
Expand Down Expand Up @@ -6423,6 +6448,7 @@ dependencies = [
"rayon",
"re_arrow2",
"re_build_tools",
"re_byte_size",
"re_format",
"re_log",
"re_log_types",
Expand Down Expand Up @@ -6479,18 +6505,17 @@ dependencies = [
"bytemuck",
"criterion",
"document-features",
"half",
"itertools 0.13.0",
"nohash-hasher",
"once_cell",
"re_arrow2",
"re_byte_size",
"re_case",
"re_error",
"re_string_interner",
"re_tracing",
"re_tuid",
"serde",
"smallvec",
"thiserror 1.0.65",
]

Expand Down Expand Up @@ -6560,6 +6585,7 @@ dependencies = [
"glam",
"itertools 0.13.0",
"nohash-hasher",
"re_arrow2",
"re_chunk_store",
"re_entity_db",
"re_log",
Expand Down Expand Up @@ -6597,6 +6623,7 @@ name = "re_view_dataframe"
version = "0.22.0-alpha.1+dev"
dependencies = [
"anyhow",
"arrow",
"egui",
"egui_table",
"itertools 0.13.0",
Expand Down Expand Up @@ -6873,6 +6900,7 @@ dependencies = [
"ahash",
"anyhow",
"arboard",
"arrow",
"bit-vec",
"bitflags 2.6.0",
"bytemuck",
Expand Down Expand Up @@ -6951,6 +6979,7 @@ name = "re_viewport_blueprint"
version = "0.22.0-alpha.1+dev"
dependencies = [
"ahash",
"arrow",
"egui",
"egui_tiles",
"itertools 0.13.0",
Expand Down Expand Up @@ -7195,6 +7224,7 @@ dependencies = [
"re_analytics",
"re_build_info",
"re_build_tools",
"re_byte_size",
"re_capabilities",
"re_chunk",
"re_chunk_store",
Expand Down Expand Up @@ -7282,6 +7312,7 @@ dependencies = [
"re_chunk",
"re_chunk_store",
"re_dataframe",
"re_grpc_client",
"re_log",
"re_log_encoding",
"re_log_types",
Expand Down Expand Up @@ -7453,16 +7484,6 @@ dependencies = [
"rerun",
]

[[package]]
name = "roundtrip_disconnected_space"
version = "0.22.0-alpha.1+dev"
dependencies = [
"anyhow",
"clap",
"re_log",
"rerun",
]

[[package]]
name = "roundtrip_image"
version = "0.22.0-alpha.1+dev"
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ re_format = { path = "crates/utils/re_format", version = "=0.22.0-alpha.1", defa
re_int_histogram = { path = "crates/utils/re_int_histogram", version = "=0.22.0-alpha.1", default-features = false }
re_log = { path = "crates/utils/re_log", version = "=0.22.0-alpha.1", default-features = false }
re_memory = { path = "crates/utils/re_memory", version = "=0.22.0-alpha.1", default-features = false }
re_byte_size = { path = "crates/utils/re_byte_size", version = "=0.22.0-alpha.1", default-features = false }
re_smart_channel = { path = "crates/utils/re_smart_channel", version = "=0.22.0-alpha.1", default-features = false }
re_string_interner = { path = "crates/utils/re_string_interner", version = "=0.22.0-alpha.1", default-features = false }
re_tracing = { path = "crates/utils/re_tracing", version = "=0.22.0-alpha.1", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions crates/build/re_types_builder/src/codegen/rust/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ fn quote_struct(
};

quote! {
impl ::re_types_core::SizeBytes for #name {
impl ::re_byte_size::SizeBytes for #name {
#[inline]
fn heap_size_bytes(&self) -> u64 {
#heap_size_bytes_impl
Expand Down Expand Up @@ -443,7 +443,7 @@ fn quote_union(
};

quote! {
impl ::re_types_core::SizeBytes for #name {
impl ::re_byte_size::SizeBytes for #name {
#[inline]
fn heap_size_bytes(&self) -> u64 {
#![allow(clippy::match_same_arms)]
Expand Down Expand Up @@ -630,7 +630,7 @@ fn quote_enum(
}
}

impl ::re_types_core::SizeBytes for #name {
impl ::re_byte_size::SizeBytes for #name {
#[inline]
fn heap_size_bytes(&self) -> u64 {
0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ fn generate_component_reflection(
|| contents.contains(&format!("impl Default for super::{}", &obj.name))
});
let custom_placeholder = if auto_derive_default || has_custom_default_impl {
quote! { Some(#type_name::default().to_arrow2()?) }
quote! { Some(#type_name::default().to_arrow()?) }
} else {
quote! { None }
};
Expand Down
1 change: 1 addition & 0 deletions crates/store/re_chunk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ arrow = ["arrow2/arrow"]
[dependencies]

# Rerun
re_byte_size.workspace = true
re_error.workspace = true
re_format.workspace = true
re_format_arrow.workspace = true
Expand Down
5 changes: 3 additions & 2 deletions crates/store/re_chunk/src/batcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ use arrow2::array::{Array as Arrow2Array, PrimitiveArray as Arrow2PrimitiveArray
use crossbeam::channel::{Receiver, Sender};
use nohash_hasher::IntMap;

use re_byte_size::SizeBytes as _;
use re_log_types::{EntityPath, ResolvedTimeRange, TimeInt, TimePoint, Timeline};
use re_types_core::{ComponentDescriptor, SizeBytes as _};
use re_types_core::ComponentDescriptor;

use crate::{chunk::ChunkComponents, Chunk, ChunkId, ChunkResult, RowId, TimeColumn};

Expand Down Expand Up @@ -695,7 +696,7 @@ impl PendingRow {
}
}

impl re_types_core::SizeBytes for PendingRow {
impl re_byte_size::SizeBytes for PendingRow {
#[inline]
fn heap_size_bytes(&self) -> u64 {
let Self {
Expand Down
22 changes: 20 additions & 2 deletions crates/store/re_chunk/src/builder.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use arrow::array::ArrayRef;
use arrow2::{
array::{Array as Arrow2Array, PrimitiveArray as Arrow2PrimitiveArray},
datatypes::DataType as Arrow2Datatype,
Expand Down Expand Up @@ -102,6 +103,23 @@ impl ChunkBuilder {
/// Add a row's worth of data using the given component data.
#[inline]
pub fn with_row(
self,
row_id: RowId,
timepoint: impl Into<TimePoint>,
components: impl IntoIterator<Item = (ComponentDescriptor, ArrayRef)>,
) -> Self {
self.with_sparse_row(
row_id,
timepoint,
components
.into_iter()
.map(|(component_descr, array)| (component_descr, Some(array.into()))),
)
}

/// Add a row's worth of data using the given component data.
#[inline]
pub fn with_row_arrow2(
self,
row_id: RowId,
timepoint: impl Into<TimePoint>,
Expand Down Expand Up @@ -142,7 +160,7 @@ impl ChunkBuilder {
timepoint: impl Into<TimePoint>,
component_batch: &dyn ComponentBatch,
) -> Self {
self.with_row(
self.with_row_arrow2(
row_id,
timepoint,
component_batch
Expand All @@ -160,7 +178,7 @@ impl ChunkBuilder {
timepoint: impl Into<TimePoint>,
component_batches: impl IntoIterator<Item = &'a dyn ComponentBatch>,
) -> Self {
self.with_row(
self.with_row_arrow2(
row_id,
timepoint,
component_batches.into_iter().filter_map(|component_batch| {
Expand Down
8 changes: 4 additions & 4 deletions crates/store/re_chunk/src/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ use arrow2::{
},
Either,
};

use itertools::{izip, Itertools};
use nohash_hasher::IntMap;

use re_byte_size::SizeBytes as _;
use re_log_types::{EntityPath, ResolvedTimeRange, Time, TimeInt, TimePoint, Timeline};
use re_types_core::{
ComponentDescriptor, ComponentName, DeserializationError, Loggable, LoggableBatch,
SerializationError, SizeBytes,
SerializationError,
};

use crate::{ChunkId, RowId};
Expand Down Expand Up @@ -1399,7 +1399,7 @@ impl TimeColumn {
}
}

impl re_types_core::SizeBytes for Chunk {
impl re_byte_size::SizeBytes for Chunk {
#[inline]
fn heap_size_bytes(&self) -> u64 {
let Self {
Expand Down Expand Up @@ -1428,7 +1428,7 @@ impl re_types_core::SizeBytes for Chunk {
}
}

impl re_types_core::SizeBytes for TimeColumn {
impl re_byte_size::SizeBytes for TimeColumn {
#[inline]
fn heap_size_bytes(&self) -> u64 {
let Self {
Expand Down
Loading

0 comments on commit ff866d1

Please sign in to comment.