Skip to content

Commit

Permalink
Reduce log spam about missing ContainerKind component (#6526)
Browse files Browse the repository at this point in the history
![image](https://github.com/rerun-io/rerun/assets/1148717/3d02590b-b1e8-42b4-8dcf-cc397798de71)



* Spam was added in #6501
* [x] Spam is now gone

---------

Co-authored-by: Jeremy Leibs <[email protected]>
  • Loading branch information
emilk and jleibs authored Jun 10, 2024
1 parent e2cb396 commit 49ab9c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
10 changes: 6 additions & 4 deletions crates/re_viewport_blueprint/src/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ impl ContainerBlueprint {
.iter()
.copied(),
);
let Some(container_kind) = results.get_instance::<ContainerKind>(resolver, 0) else {
re_log::error!("Container {id:?} is lacking the required `ContainerKind` component.");
return None;
};

// This is a required component. Note that when loading containers we crawl the subtree and so
// cleared empty container paths may exist transiently. The fact that they have an empty container_kind
// is the marker that the have been cleared and not an error.
let container_kind = results.get_instance::<ContainerKind>(resolver, 0)?;

let blueprint_archetypes::ContainerBlueprint {
container_kind,
display_name,
Expand Down
13 changes: 5 additions & 8 deletions crates/re_viewport_blueprint/src/space_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,11 @@ impl SpaceViewBlueprint {
.copied(),
);

let Some(class_identifier) =
results.get_instance::<blueprint_components::SpaceViewClass>(resolver, 0)
else {
re_log::error!(
"View blueprint at {id:?} is lacking the required `SpaceViewClass` component."
);
return None;
};
// This is a required component. Note that when loading space-views we crawl the subtree and so
// cleared empty space-views paths may exist transiently. The fact that they have an empty class_identifier
// is the marker that the have been cleared and not an error.
let class_identifier =
results.get_instance::<blueprint_components::SpaceViewClass>(resolver, 0)?;

let blueprint_archetypes::SpaceViewBlueprint {
class_identifier,
Expand Down

0 comments on commit 49ab9c4

Please sign in to comment.