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

Fail codegen when archetype fields don't have one of the required attributes #8326

Merged
merged 6 commits into from
Dec 5, 2024

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Dec 5, 2024

What

All of our archetypes' fields must have one of the attr.rerun.component_{required|recommended|optional} attribute. Let's fail codegen when they are missing, so we stop falling into that pitfall.

@abey79 abey79 added 🧑‍💻 dev experience developer experience (excluding CI) codegen/idl exclude from changelog PRs with this won't show up in CHANGELOG.md labels Dec 5, 2024
Copy link

github-actions bot commented Dec 5, 2024

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link
0c8541e https://rerun.io/viewer/pr/8326

Note: This comment is updated whenever you push a commit.

@abey79 abey79 requested a review from Wumpf December 5, 2024 15:03
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.. hower, I didn't realize you put this into the rust codegen when this is actually completely language agnostic.
this should go into Objects::from_raw_schema which is where we have general validation like this
... but I don't want to hold up if this turns out to be too much hassle.

@abey79 abey79 merged commit 76d4663 into main Dec 5, 2024
31 checks passed
@abey79 abey79 deleted the antoine/codegen-check-archetype-fields branch December 5, 2024 15:54
@Wumpf
Copy link
Member

Wumpf commented Dec 5, 2024

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen/idl 🧑‍💻 dev experience developer experience (excluding CI) exclude from changelog PRs with this won't show up in CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants