-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
New API for GDNative #44989
New API for GDNative #44989
Conversation
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.
Amazing cleanup. I like PRs with this kind of additions/removals ratio :)
Windows build seems to fail with:
|
Aside from |
I'm not sure why this is happening. Is it failing to generate this file? Reminds of the old issue with parallel builds on Windows, but I think that was fixed already. Edit: tried on my machine and it builds fine. |
a8d0b3c
to
af1f403
Compare
Regarding the build issue, I've exhausted my ideas. It seems the WebRTC module needs GDNative but for some reason it doesn't trigger the generation of the API struct header. On my machine it works. I wonder if it's something related to the CI cache. |
It does call
but it seems that there's a race condition, the file is not generated/released in time to be used by the webrtc gdnative code. I'd posit that the race condition is likely a pre-existing bug (the dependency from CC @Faless |
@akien-mga is there any way I can tell scons that one module depends on the other so they are built sequentially? |
@Faless No easy way that I can think of, at least with our current setup. The build order likely comes from how the Current order for modules seems to be alphabetical. |
Testing this hack, let's see: akien-mga@5b0e522 Edit: No luck. But now it failed while building tests early on, doesn't seem related to webrtc. It's not clear to me what file caused the include of the GDNative generated header, but it seems that |
af1f403
to
7615136
Compare
I updated this to add a version of the discovery API to take a regular I've also added a few missing methods to the builtin methods discovery (to get argument count, type and name, and the return type, besides checking if they are const or vararg). |
But it's still failing to build. I will try to take a look in the tests. |
This API now uses the discovery functions present in Variant instead of wrapping every built-in function. Users now need to query for function pointers and use those.
Those are now utilities so the function pointer can be fetched when needed.
7615136
to
29e5dd0
Compare
I think I fixed this now. Let's see if the CI finishes correctly. Edit: Yes, it did. Somehow only on the Windows editor build it was wrongly treating |
Thanks! |
This removes the old functions that were wrappers for builtin functions and instead provide the new discovery API to get function pointers for those.
Also removes the
print*()
functions since those are utility functions that also can be queried.