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

CI: Add 4.2-stable.expected file for GDExtension compatibility checks #85748

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2987,24 +2987,28 @@ bool Main::start() {
return false;
}

if (dump_gdextension_interface) {
GDExtensionInterfaceDump::generate_gdextension_interface_file("gdextension_interface.h");
}
// GDExtension API and interface.
{
if (dump_gdextension_interface) {
GDExtensionInterfaceDump::generate_gdextension_interface_file("gdextension_interface.h");
}

if (dump_extension_api) {
Engine::get_singleton()->set_editor_hint(true); // "extension_api.json" should always contains editor singletons.
GDExtensionAPIDump::generate_extension_json_file("extension_api.json", include_docs_in_extension_api_dump);
}
if (dump_extension_api) {
Engine::get_singleton()->set_editor_hint(true); // "extension_api.json" should always contains editor singletons.
GDExtensionAPIDump::generate_extension_json_file("extension_api.json", include_docs_in_extension_api_dump);
}

if (dump_gdextension_interface || dump_extension_api) {
OS::get_singleton()->set_exit_code(EXIT_SUCCESS);
return false;
}
if (dump_gdextension_interface || dump_extension_api) {
OS::get_singleton()->set_exit_code(EXIT_SUCCESS);
return false;
}

if (validate_extension_api) {
bool valid = GDExtensionAPIDump::validate_extension_json_file(validate_extension_api_file) == OK;
OS::get_singleton()->set_exit_code(valid ? EXIT_SUCCESS : EXIT_FAILURE);
return false;
if (validate_extension_api) {
Engine::get_singleton()->set_editor_hint(true); // "extension_api.json" should always contains editor singletons.
Copy link
Member Author

Choose a reason for hiding this comment

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

This fixes the issue that singletons/EditorInterface was missing in the API generated by --validation-extension-api, thus failing the comparison with the file generated by --dump-extension-api, which uses editor hint.

The rest is just a cosmetic change to keep GDExtension stuff visually grouped together.

bool valid = GDExtensionAPIDump::validate_extension_json_file(validate_extension_api_file) == OK;
OS::get_singleton()->set_exit_code(valid ? EXIT_SUCCESS : EXIT_FAILURE);
return false;
}
}

#ifndef DISABLE_DEPRECATED
Expand Down
Copy link
Member

Choose a reason for hiding this comment

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

The text at this file should be changed to be in sync with the 4.0->4.1 file. I updated #76560 to include this.

File renamed without changes.
9 changes: 9 additions & 0 deletions misc/extension_api_validation/4.2-stable.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
This file contains the expected output of --validate-extension-api when run against the extension_api.json of the
4.2-stable tag (the basename of this file).

Only lines that start with "Validate extension JSON:" matter, everything else is considered a comment and ignored. They
should instead be used to justify these changes and describe how users should work around these changes.

Add new entries at the end of the file.

## Changes between 4.2-stable and 4.3-stable
Loading