-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Add check to ensure registered classes are declared #81020
Add check to ensure registered classes are declared #81020
Conversation
If someone has pointers for what to put in the docs for the XR class I'd appreciate, only added because the class became registered, can be done separately |
modules/openxr/action_map/openxr_interaction_profile_meta_data.h
Outdated
Show resolved
Hide resolved
Will also see about adding a similar check to godot-cpp if this method is desired Edit: Doesn't seem to be an issue in godot-cpp, it fails to compile for classes without the macro regardless |
Possibly fixes this too: #73936 |
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.
I tested this PR on a big project (The Mirror). Everything still works as before. Also, the editor startup time went from ~9.5 seconds to ~8.5 seconds. Wow!
I'm approving but this is just a "check if it works" review, not a code review.
Ok, added some descriptions to include in the documentation XML. |
20a9475
to
5e4dcfd
Compare
Thank you! |
d79a65c
to
37d307e
Compare
Edit: Moved question on OpenXRInteractionProfileMetaData naming scheme to #81037. It would also make sense to split the fixes to the OpenXR class and the actual core check in separate commits. (OpenXR changes first, so that the core check passes.) |
Can split it off later today when I have time! |
Probably isn't as critical for 4.0 now but leaving the label for now, feel free to remove it if it isn't considered significant (it still matters for custom modules, but seeing how 4.0.5 is likely the last 4.0 patch it won't affect core much) |
Tested and works well for 3.x as well so if this gets merged I can open a 3.x version as well to ensure correctness, there's no missed cases in 3.x however based on testing it, and that without this check removing |
5c288cc
to
63d2f6b
Compare
63d2f6b
to
8fce7d9
Compare
Checks that all classes registered to `ClassDB` have been properly declared with `GDCLASS`
8fce7d9
to
c638238
Compare
Thanks! |
Thank you! |
Cherry-picked for 4.1.2. |
Checks that all classes registered to
ClassDB
have been properly declared withGDCLASS
The error message fired is pretty clear IMO as it references the method called, like so: