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

Replace complex uses of query_entity_with_primary with query_latest_single #2137

Merged
merged 15 commits into from
May 16, 2023

Conversation

emilk
Copy link
Member

@emilk emilk commented May 16, 2023

Closes #2122 by no longer warning on the spurious problem, which has no actual manifestation - it works as expected. I think it is a timing thing (loading the blueprint before any data has been loaded maybe?)

What

We have some "mono-components" (Transform, Tensor and ViewCoordinates), which we only allow one of per entity. For those we have a nice helper function, query_latest_single which is much simpler than query_entity_with_primary..

This PR also adds a result.warn_on_err_once helper which can be used to quickly log an Err and get an Option. Much better than ignoring the error. Ultimately i didn't need it in this PR, but I have missed it many other times, so it will come in use, I'm sure.

Checklist

PR Build Summary: https://build.rerun.io/pr/2137

@emilk emilk added the 🚜 refactor Change the code, not the functionality label May 16, 2023
@emilk emilk added the 📺 re_viewer affects re_viewer itself label May 16, 2023
@emilk emilk marked this pull request as ready for review May 16, 2023 10:10
@teh-cmc teh-cmc self-requested a review May 16, 2023 12:35
crates/re_log_types/src/component_types/tensor.rs Outdated Show resolved Hide resolved
crates/re_log_types/src/component_types/transform.rs Outdated Show resolved Hide resolved
crates/re_viewer/src/ui/view_bar_chart/scene.rs Outdated Show resolved Hide resolved
@emilk emilk merged commit 9125cf5 into main May 16, 2023
@emilk emilk deleted the emilk/investigate-plot-failure branch May 16, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📺 re_viewer affects re_viewer itself 🚜 refactor Change the code, not the functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plots example is partially broken?
2 participants