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
Remove legacy re_components
#3440
Conversation
/// Check that known (`rerun.`) components have the expected schemas. | ||
#[cfg(debug_assertions)] | ||
fn check_known_component_schemas(msg: &ArrowMsg) { | ||
// Check that we have the expected schemas | ||
let known_fields: ahash::HashMap<&str, &arrow2::datatypes::Field> = | ||
re_components::iter_registered_field_types() | ||
.map(|field| (field.name.as_str(), field)) | ||
.collect(); | ||
|
||
for actual in &msg.schema.fields { | ||
if let Some(expected) = known_fields.get(actual.name.as_str()) { | ||
if let arrow2::datatypes::DataType::List(actual_field) = &actual.data_type { | ||
// NOTE: Don't care about extensions until the migration is over (arrow2-convert | ||
// issues). | ||
let actual_datatype = actual_field.data_type.to_logical_type(); | ||
let expected_datatype = expected.data_type.to_logical_type(); | ||
if actual_datatype != expected_datatype { | ||
re_log::warn_once!( | ||
"The incoming component {:?} had the type:\n{:#?}\nExpected type:\n{:#?}", | ||
actual.name, | ||
actual_field.data_type, | ||
expected.data_type, | ||
); | ||
} | ||
if actual.is_nullable != expected.is_nullable { | ||
re_log::warn_once!( | ||
"The incoming component {:?} has is_nullable={}, expected is_nullable={}", | ||
actual.name, | ||
actual.is_nullable, | ||
expected.is_nullable, | ||
); | ||
} | ||
} else { | ||
re_log::warn_once!( | ||
"The incoming component {:?} was:\n{:#?}\nExpected:\n{:#?}", | ||
actual.name, | ||
actual.data_type, | ||
expected.data_type, | ||
); | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have a registry anymore, and this is already covered by roundtrips.
Waiting to see how the attempted removal of the legacy python |
e6e5dad
to
e9596e4
Compare
640baf0
to
ce1ef1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍾
All the grunt work necessary to get rid of
re_components
entirely.Mostly surprise-free.
What
Checklist