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

[Editor] Prevent some shortcut errors when generating docs #91515

Merged
merged 1 commit into from
May 4, 2024

Conversation

AThousandShips
Copy link
Member

@AThousandShips AThousandShips commented May 3, 2024

Makes the check for EditorSettings singleton in the shortcut override methods silent to avoid errors on documentation generation

To see the change compare the CI run of this and master for example, this will turn up at the top of both the class reference update and the C# glue:

ERROR: EditorSettings not instantiated yet.
   at: ED_SHORTCUT_OVERRIDE_ARRAY (editor/editor_settings.cpp:1658)
ERROR: EditorSettings not instantiated yet.
   at: ED_SHORTCUT_OVERRIDE_ARRAY (editor/editor_settings.cpp:1658)

@akien-mga
Copy link
Member

How about removing the error check in ED_SHORTCUT_OVERRIDE* instead, and just make it a silent return?

@AThousandShips
Copy link
Member Author

AThousandShips commented May 3, 2024

Could do that, but it is an action that expects things to work so might be safer to have it error correctly when it's expected to work correctly, but can make an alternative solution like that

The non-override versions do exit silently so could equalize that

Will make a second commit with that solution instead and we'll decide which to go with

Edit: Alternative fix, while also removing all those checks existing already, will see what CI says but it seems to work just as well, only drawback is that we won't get errors when we might want to otherwise, but less hacky

@akien-mga
Copy link
Member

Yeah I think we can go with this alternative solution.

@AThousandShips AThousandShips removed the request for review from a team May 3, 2024 15:47
@akien-mga akien-mga merged commit e071f67 into godotengine:master May 4, 2024
16 checks passed
@AThousandShips AThousandShips deleted the shortcut_fix branch May 4, 2024 09:57
@akien-mga
Copy link
Member

Thanks!

@AThousandShips
Copy link
Member Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"ERROR: EditorSettings not instantiated yet." when running --doctool or --generate-mono-glue
2 participants