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

Remove legacy re_components #3440

Merged
merged 3 commits into from Sep 26, 2023
Merged

Remove legacy re_components #3440

merged 3 commits into from Sep 26, 2023

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Sep 25, 2023

All the grunt work necessary to get rid of re_components entirely.
Mostly surprise-free.

What

Checklist

Comment on lines -216 to -263
/// 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,
);
}
}
}
}
Copy link
Member Author

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.

@teh-cmc
Copy link
Member Author

teh-cmc commented Sep 25, 2023

Waiting to see how the attempted removal of the legacy python Transform3D goes.

@teh-cmc teh-cmc marked this pull request as ready for review September 26, 2023 08:46
@teh-cmc teh-cmc added ⛴ release Related to shipping or publishing 🚜 refactor Change the code, not the functionality include in changelog labels Sep 26, 2023
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍾

@teh-cmc teh-cmc merged commit 6810d05 into main Sep 26, 2023
28 of 32 checks passed
@teh-cmc teh-cmc deleted the cmc/burn_re_components branch September 26, 2023 09:17
@emilk emilk changed the title Annihilate legacy re_components Remove legacy re_components Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 🚜 refactor Change the code, not the functionality ⛴ release Related to shipping or publishing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants