Skip to content

Commit 0438ccb

Browse files
authored
Ensure we migrate deprecated types on ingestion (#9370)
### Related * Part of #9110 * In preparation for #9338 ### What Ensures that after loading an .rrd, there are no deprecated components or archetypes remaining. All deprecated types should have been migrated to non-deprecated types.
1 parent 4b19895 commit 0438ccb

File tree

4 files changed

+202
-0
lines changed

4 files changed

+202
-0
lines changed

crates/build/re_types_builder/src/codegen/rust/reflection.rs

+15
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,16 @@ fn generate_component_reflection(
144144
quote! { None }
145145
};
146146

147+
let deprecation_notice = if let Some(notice) = obj.deprecation_notice() {
148+
quote! { Some(#notice) }
149+
} else {
150+
quote! { None }
151+
};
152+
147153
let quoted_reflection = quote! {
148154
ComponentReflection {
149155
docstring_md: #docstring_md,
156+
deprecation_notice: #deprecation_notice,
150157
custom_placeholder: #custom_placeholder,
151158
datatype: #type_name::arrow_datatype(),
152159
verify_arrow_array: #type_name::verify_arrow_array,
@@ -242,10 +249,18 @@ fn generate_archetype_reflection(reporter: &Reporter, objects: &Objects) -> Toke
242249
})
243250
.collect_vec();
244251

252+
let deprecation_notice = if let Some(notice) = obj.deprecation_notice() {
253+
quote! { Some(#notice) }
254+
} else {
255+
quote! { None }
256+
};
257+
245258
let quoted_archetype_reflection = quote! {
246259
ArchetypeReflection {
247260
display_name: #display_name,
248261

262+
deprecation_notice: #deprecation_notice,
263+
249264
scope: #scope,
250265

251266
view_types: &[

0 commit comments

Comments
 (0)