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

Correctly register editor-only module classes with the API #86209

Merged

Conversation

YuriSizov
Copy link
Contributor

Fixes #86206. We can call it a regression from #49524. Probably worth cherry-picking, though technically this changes the exposed API.

This pattern is used in the GLTF module, btw.

@YuriSizov YuriSizov added bug topic:core topic:gdextension cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Dec 15, 2023
@YuriSizov YuriSizov added this to the 4.3 milestone Dec 15, 2023
@YuriSizov YuriSizov requested a review from a team as a code owner December 15, 2023 18:00
Copy link
Contributor

@Bromeon Bromeon left a comment

Choose a reason for hiding this comment

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

Just recompiled Godot release using commit 0f8c955.
The class is now correctly exposed to the JSON as:

		{
			"name": "ResourceImporterOggVorbis",
			"is_refcounted": true,
			"is_instantiable": true,
			"inherits": "ResourceImporter",
			"api_type": "editor",
			"methods": [ <load_from_buffer, load_from_file> ]
		},

I'm not very familiar with the codebase, but assuming that GDREGISTER_CLASS cannot return, it looks correct. A small test of our dodge-the-creeps example actually shows it working in Release.

Thanks a lot for this super-fast fix! 🙂

@YuriSizov YuriSizov merged commit 30e77a6 into godotengine:master Dec 16, 2023
15 checks passed
@YuriSizov YuriSizov deleted the main-fix-editor-only-module-classes branch December 16, 2023 16:57
@YuriSizov
Copy link
Contributor Author

Thanks for testing!

@YuriSizov YuriSizov removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Jan 25, 2024
@YuriSizov
Copy link
Contributor Author

Cherry-picked for 4.2.2.

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.

Some GDExtension methods are unavailable in Release builds
2 participants