-
Notifications
You must be signed in to change notification settings - Fork 399
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
Generate reflection for archetypes #6623
Conversation
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.
good to have this in the same place!
|
||
let mut code = format!("// {}\n\n", autogen_warning!()); | ||
code.push_str("#![allow(unused_imports)]\n"); | ||
code.push_str("#![allow(clippy::too_many_lines)]\n"); |
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.
huh, news to me that we have this lint active anywhere
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.
Good! It means you don't often hit our very high function line limit
Line 24 in 7b35938
too-many-lines-threshold = 600 # TODO(emilk): decrease this |
let id = egui::Id::new((archetype_name, field.display_name)); | ||
ui.markdown_ui(id, field.docstring_md); |
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 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 a bug: lampsitter/egui_commonmark#54
What
ArchetypeFieldInfo
into thereflection
module #6616Replaces the previous code with the new reflection code.
For now I decided that the archetype reflection is still opt-in (with
attr.rust.generate_field_info
) just to reduce the amount of strings bloating our .wasm binary. We can easily change this in the future if we want to.Checklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerTo run all checks from
main
, comment on the PR with@rerun-bot full-check
.