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
Register enum type names in release build #64253
Register enum type names in release build #64253
Conversation
Can you fix the conflicts? I think this is the only way to fix #69532 :) |
@anvilfolk |
Thank you! You also need to squash your commits into a single commit! :) |
697261f
to
7f4ffd6
Compare
ok, I squashed 2 commits into a commit. |
Perfect! I struggled a lot to make that work the first time! :) Let's see if we can't get this PR in :) |
You still have two commits, because you merged the master branch back on top of your squashed commit instead of rebasing: Moreover, the commit message should not be "Squash commit" - that's what you did, but we need to know what the commit does. It should describe how it improves/changes/fixes engine functionality. See https://github.com/godotengine/godot/blob/master/CONTRIBUTING.md#format-your-commit-messages-with-readability-in-mind |
Sorry, my bad for not spotting that. That's what you get with insomnia at 5am ;) This guide helped me: https://www.sitepoint.com/git-interactive-rebase-guide/ |
681b8a1
to
8d862a4
Compare
@akien-mga @anvilfolk |
I've actually been meaning to do this, since the alternative is remove the ability to address enums by their names. The only thing I want to see is a comparison in size of release builds with and without this. Though I doubt it would be much since I don't think that are that many enums around. |
core/object/class_db.h
Outdated
#ifdef DEBUG_METHODS_ENABLED | ||
|
||
#define BIND_CONSTANT(m_constant) \ | ||
::ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant); | ||
|
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.
Given this is the same with or without DEBUG_METHODS_ENABLED
it could stay outside the #ifdef
too.
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.
Sorry, that's probably because I made mistakes when I tried to fix conflicts.
And unfortunately, my branch seems to be broken now (cannot checkout or reset). I will close this PR and make new one later if necessary.
Hey, @heppocogne, you need to rebase and squash again. You seem to have dragged unrelated changes into your PR, probably by merging master into it. Remember that in feature branches you shouldn't merge master, you should rebase those branches against the master instead. |
3eaa66a
to
6f31f7b
Compare
@YuriSizov Thank you! I could manage to restore my repository. |
@neikeq yeah, it would be interesting to profile that, maybe we can optimize it. That could potentially help with editor startup as well. |
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.
Would be interesting to profile startup to see the actual impact, but I believe this change is needed in any case to keep consistency between debug and release behavior.
Thanks! |
If this has a negative on startup time, perhaps we could cache the result from |
This commit fixes #64084