-
Notifications
You must be signed in to change notification settings - Fork 373
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
Handle serde-field that fails to deserialize #3130
Conversation
…erialize blueprint
…ved from the view
&& self | ||
.space_views | ||
.values() | ||
.all(|sv| sv.class_name() == &SpaceViewClassName::invalid()) |
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.
it's only invalid if all are invalid? What if 9/10 are invalid?
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.
My thought process was that if there are some views that are valid, then we have something to show, so I don't want to just throw it away. The user can always manually click the reset button in that case, or just remove the invalid views to create new ones.
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.
Fair - let's add that as a comment. Are the invalid views culled somewhere?
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.
There's no culling yet, though we could add it. At the moment, instead the layout remains unchanged, but the invalid view just shows a warning message. My thought was that once we get to a point where only some views can be invalid, it's better to make the user aware that something went wrong so they can handle it than to just magically cull them behind the scenes.
131da66
to
8831ec0
Compare
### What arrow2-convert forces us into needing to provide data even if serde fail to deserialize the field. Fall back to default in this case, but specify invalid. Additionally, this checks to see if a blueprint is totally invalid and if so resets it to the default state. Because this can reset the blueprint immediately upon loading, it was important that this properly set auto-space-views. Needed to pull in a slightly different version of #3077 that still works with the now-required usage of Default. Resolves: #3127 ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3129) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/3129) - [Docs preview](https://rerun.io/preview/8831ec03d85499333648bb15442a39760a2ad41d/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/8831ec03d85499333648bb15442a39760a2ad41d/examples) <!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://ref.rerun.io/dev/bench/) - [Wasm size tracking](https://ref.rerun.io/dev/sizes/) --------- Co-authored-by: Andreas Reich <[email protected]>
### What arrow2-convert forces us into needing to provide data even if serde fail to deserialize the field. Fall back to default in this case, but specify invalid. Additionally, this checks to see if a blueprint is totally invalid and if so resets it to the default state. Because this can reset the blueprint immediately upon loading, it was important that this properly set auto-space-views. Needed to pull in a slightly different version of #3077 that still works with the now-required usage of Default. Resolves: #3127 ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3129) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/3129) - [Docs preview](https://rerun.io/preview/8831ec03d85499333648bb15442a39760a2ad41d/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/8831ec03d85499333648bb15442a39760a2ad41d/examples) <!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://ref.rerun.io/dev/bench/) - [Wasm size tracking](https://ref.rerun.io/dev/sizes/) --------- Co-authored-by: Andreas Reich <[email protected]>
### What arrow2-convert forces us into needing to provide data even if serde fail to deserialize the field. Fall back to default in this case, but specify invalid. Additionally, this checks to see if a blueprint is totally invalid and if so resets it to the default state. Because this can reset the blueprint immediately upon loading, it was important that this properly set auto-space-views. Needed to pull in a slightly different version of #3077 that still works with the now-required usage of Default. Resolves: #3127 ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3129) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/3129) - [Docs preview](https://rerun.io/preview/8831ec03d85499333648bb15442a39760a2ad41d/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/8831ec03d85499333648bb15442a39760a2ad41d/examples) <!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://ref.rerun.io/dev/bench/) - [Wasm size tracking](https://ref.rerun.io/dev/sizes/) --------- Co-authored-by: Andreas Reich <[email protected]>
What
arrow2-convert forces us into needing to provide data even if serde fail to deserialize the field. Fall back to default in this case, but specify invalid.
Additionally, this checks to see if a blueprint is totally invalid and if so resets it to the default state. Because this can reset the blueprint immediately upon loading, it was important that this properly set auto-space-views. Needed to pull in a slightly different version of #3077 that still works with the now-required usage of Default.
Resolves: #3127
Checklist