After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 585351 - GObject Introspection
GObject Introspection
Product: libgda
Classification: Other
Component: general
Other All
: Normal enhancement
: ---
Assigned To: malerba
gnome-db Maintainers
Depends on: 585706 612022
Blocks: 585444
Reported: 2009-06-10 16:05 UTC by Daniel Espinosa
Modified: 2010-03-10 20:29 UTC
See Also:
GNOME target: ---
GNOME version: ---

Added Introspection to GDA (52.60 KB, patch)
2009-06-14 07:25 UTC, Daniel Espinosa
none Details | Review
This patch reverts the change from GDA_TYPE_ERROR to G_TYPE_ERROR and GDA_TYPE_SLIST to G_TYPE_SLIST.l (4.23 KB, patch)
2009-06-15 19:06 UTC, Daniel Espinosa
none Details | Review
Patch to add GObjectInstrospection. No default invokers can't be detected for now. (7.04 KB, patch)
2009-09-24 04:40 UTC, Daniel Espinosa
none Details | Review
Add GObjectIntrospection to GDA (4.76 KB, patch)
2009-12-08 23:53 UTC, Daniel Espinosa
none Details | Review

Description Daniel Espinosa 2009-06-10 16:05:47 UTC
I want to change the name of virtual methods in GdaDataModel in order to allow Introspection detects automatically the default invoker. Today all Interface virtual methods have an 'i_*' prefix this makes Introspection not to detect the default invoker like in DataHandler, then then deprecates this prefix will fix this.
Comment 1 Daniel Espinosa 2009-06-14 07:25:54 UTC
Created attachment 136538 [details] [review]
Added Introspection to GDA

This patch adds support to GObject Introspection to GDA. Tries to modify as less as possible, but in some cases like in GdaDataModel is better to change some virtual methods' names in order to allow instrospection's g-ir-scanner tool detects the correct default invoker.

This patch also fix bug #585706.
Comment 2 Daniel Espinosa 2009-06-15 19:06:06 UTC
Created attachment 136657 [details] [review]
This patch reverts the change from GDA_TYPE_ERROR to G_TYPE_ERROR and GDA_TYPE_SLIST to G_TYPE_SLIST.l

This just reverts the change on the macro, but the patch #136538 must be applied first.

Even this I've filed bug #585707, to ask why GError, GSList and other GLib types doesn't have a G_TYPE_* macro.
Comment 3 malerba 2009-08-26 07:07:36 UTC
It's not possible to rename the virtual methods because this would break the ABI which is something I don't/can't do now (it should have been done before the 4.0 was released).

I really appreciate your work to make Libgda introspectable, but I'm afraid you'll have to find a workaround for this problem.
Comment 4 Daniel Espinosa 2009-09-24 04:34:30 UTC
I have a patch to add basic GObjectInstrospection to GDA without modify virtual methods.

This patch don't allows to detect the default invoker of such virtual methods,  even that the scanner and compiller works.

I'll trying to get help from GObjectIntrospection team on how add metadata to GDA source in order to tells the scanner how detects the default invoker.
Comment 5 Daniel Espinosa 2009-09-24 04:40:03 UTC
Created attachment 143863 [details] [review]
Patch to add GObjectInstrospection. No default invokers can't be detected for now.

GObjectInstrospection's scanner don't detects the default invoker for some Classes, becouse virtual method's name. The works continues to investigate the way to add metadata, in order to tell scanner how locate the default invoker.
Comment 6 malerba 2009-09-30 18:59:25 UTC
As much as I'd like to have introspection support in Libgda, I can't apply your patch because it fails with:

libgda/ HAVE_INTROSPECTION does not appear in AM_CONDITIONAL
Comment 7 Daniel Espinosa 2009-10-01 22:45:34 UTC
You must have GObjectIntrospection installed. Get it from

git clone git://

I don't find how to add a directive to enable/desable gobject-introspection, but may be this *must* be installed allways in order to make it available for any language in the computer. I'm not really sure.

I've tested using lastest version on master:



and I have no problem.
Comment 8 Daniel Espinosa 2009-12-08 23:53:25 UTC
Created attachment 149383 [details] [review]
Add GObjectIntrospection to GDA

This patch allows to add GObjectIntrospection to GDA.

Even when some virtual methods invokers aren't detected it works on Seed (JavaScript).

The JavaScript must be extensible tested and need to add annotations to the sources in order to make it work as spected.
Comment 9 Daniel Espinosa 2009-12-08 23:59:57 UTC
Example JavaScript code to test under seed. Sustitud the DSN and query table with your own; at the en it dumps the table's contents.

# JavaScript Gda Test using Seed

Gda =;

cnn = Gda.Connection.open_from_dsn ("cash_test");

parser = cnn.create_parser();

stm = parser.parse_string ("SELECT * FROM transactions");

dataset = cnn.statement_execute_select (stm);

print (dataset.dump_as_string());
Comment 10 malerba 2009-12-09 20:44:59 UTC
Patch committed with some minor modifications. Thanks a lot for that work!
Will you be doing it for Libgdaui as well?
Comment 11 malerba 2009-12-21 22:21:38 UTC
Marking as resolved, as bug #604220 has been filled for the UI extension.
Comment 12 Daniel Espinosa 2010-03-09 00:14:41 UTC
Exists some typo on libgda/, witch made not to include all *.c files, this will exclude any GOI annotations and some details are hiden like implemented interfaces and so on.

But in order to fix this GOI must fix bug 612022.

Some missing typedef for GError codes must be added or fixed its enum's name. This could be done easy on the way, including add annotations on *.c files for improve GOI support.
Comment 13 Daniel Espinosa 2010-03-10 20:29:52 UTC
GDA has an initial support for GObject Introspection. It needs to be improved, but this will be track in Bug 612480.