-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support overrides #10
Conversation
This pattern is similar to what GJS does already, for example: https://gitlab.gnome.org/GNOME/gjs/-/blob/HEAD/modules/core/overrides/GLib.js |
This PR also needs to get merged later, converting to draft. |
5378d5e
to
911db9d
Compare
5e34466
to
e40a224
Compare
1cb3437
to
a4eddcc
Compare
Are you sure this is ready? |
also move gobject.object overrides to new file allowing to construct objects by extending remove girepository symbol
Hmm. I see the examples are not working. However, they are not working in the |
…aded previously, doing `require("Adw", "1")` would fail to register `GObject.Object.connect`, as the `GObject` namespace would not be loaded. Currently, now `require` will also load the given dependencies of the loaded namespace, so that their overrides can be loaded.
Wait. I see what happened now. I got errors while trying to execute the files in the This PR is ready for re-review, as it works, please let me know what you think. |
Only |
main purpose of you can test your local changes by adding the following deno.json file: {
"imports": {
"https://github.com/ahgilak/deno_gi/raw/main/mod.ts": "./mod.ts"
}
} |
This is the error comes up while running the examples in current PR
|
Yes, I see. it can still get versioned right?
The fixes for that are in #26. Do you want me to include that PR in this one? I wanted to include it in a separate PR because it fixes more things than this specific issue. |
No I meant other examples are working fine on main branch, but broken in this PR. |
Yes, I know :) I was saying that that problem is indeed exposed by this PR, but the fix is in a separate PR because it handles other cases too of this bug. I will include the fix in this PR though, to streamline things. |
this method gets the closest parent gtype that is registered in gobject-introspection. this is because classes registed manually (in deno_gi) can't be constructed from their GBaseInfo. In the future, we will probably need to maintain a reference to the manually registed classes so they can be constructed from reference.
instead of soft crashing, this method instead bails immediately
fixed everything. please take a look! |
Thanks! |
also move gobject.object overrides to new file
allowing to construct objects by extending the existing object