-
Notifications
You must be signed in to change notification settings - Fork 46
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
Experimental: Split core and api #718
Draft
CedNaru
wants to merge
16
commits into
master
Choose a base branch
from
experimental/split-core-and-api
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CedNaru
force-pushed
the
experimental/split-core-and-api
branch
from
October 11, 2024 14:19
ea23a1f
to
2930f2f
Compare
CedNaru
force-pushed
the
experimental/split-core-and-api
branch
from
October 11, 2024 14:53
2930f2f
to
d88fba9
Compare
CedNaru
force-pushed
the
experimental/split-core-and-api
branch
from
October 12, 2024 08:44
c13c5f6
to
41b9d0e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not meant to be merged but more an experiment to see if we can properly split the current godot-library into 2. So we can keep the api gen outside the core library.
The line changes are huge, but at the end of the day, it's just moving stuff around and renaming some packages.
I encourage you to just check out the branch directly and check for yourself. Most of the changes are in the api generator.
The main idea is that the now "core" layer contains Godot global enum +
Object
+RefCounted
, as well as the numbered generic Callable and Signal. Everything else is then generated in the "Api" layer.The biggest challenge with splitting the library are the circular references between the core and api types.
The core layer is fully standalone, it only requires
Object
andRefcounted
to be implemented in it to work.The Api layer needs core as a dependency, the main issue is that now some core internal classes and methods are not available. For this, I now rely on a "hack", I added a public object
Internals
that indirectly expose the internal methods I need to access.I don't want to keep that hack around, but once everything compile and pass the unit test, it will be much easier to see the set of classes and methods having a visibility issue, and we can proceed forward with improving that.