Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sanity-check that an archetype has a component (#7330)
### What We're starting to build in a lot of assumptions in our code about what archetypes has what components. This happens here and there where we query for components directly. At first I added the checks at runtime using reflection, before I realized we can do it at compile-time instead: ```rs fn _check_encoded_image_has_blob(image: &archetypes::EncodedImage) { let _: components::Blob = image.blob; } ``` This means we will be reminded to update the code if we ever change the archetype to e.g. use a `EncodedImageBuffer` component or similar in the future! ### 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 the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7188?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7188?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7188) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
- Loading branch information