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

Detect whether virtual functions are required to override #904

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Sep 23, 2024

From Godot 4.4 onward, we can use the GDExtension-provided information, which states whether virtual functions have a default implementation or are required to be overridden.

Depends on upstream godotengine/godot#93311.

@Bromeon Bromeon added feature Adds functionality to the library c: engine Godot classes (nodes, resources, ...) status: upstream Depending on upstream fix (typically Godot) labels Sep 23, 2024
@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-904

@TitanNano
Copy link
Contributor

This looks great 👏

@Bromeon
Copy link
Member Author

Bromeon commented Sep 24, 2024

In a second step, I was planning to export the 4.4 data about which virtual functions are required, and use it for the hardcoded list in API levels 4.1-4.3. This would of course not work if "required-ness" changes in between, but I'd still expect it to be more accurate than the current list.

@TitanNano
Copy link
Contributor

@Bromeon the last time I updated the hard-coded list I basically did that. I used the WIP branch on the engine, dumped the API and more or less pasted the data as rust code. So I think we should be totally fine with using a static JSON.

From Godot 4.4 onward, we can use the GDExtension-provided information, which states whether
virtual functions have a default implementation or are required to be overridden.
@Bromeon Bromeon force-pushed the feature/detect-required-virtuals branch from 7b03ec3 to b1db236 Compare September 28, 2024 12:31
@Bromeon Bromeon marked this pull request as ready for review September 28, 2024 12:32
@Bromeon Bromeon added this pull request to the merge queue Sep 28, 2024
Merged via the queue into master with commit 8ad9cb0 Sep 28, 2024
15 checks passed
@Bromeon Bromeon deleted the feature/detect-required-virtuals branch September 28, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: engine Godot classes (nodes, resources, ...) feature Adds functionality to the library status: upstream Depending on upstream fix (typically Godot)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants