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 728482 - Fix name clashes when using introspection
Fix name clashes when using introspection
Status: RESOLVED OBSOLETE
Product: gom
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Gom Maintainers
Gom Maintainers
Depends on:
Blocks: 753379
 
 
Reported: 2014-04-18 08:09 UTC by Tristan Brindle
Modified: 2019-03-20 10:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vala: Add m4/vapigen.m4 (4.01 KB, patch)
2014-04-18 08:16 UTC, Tristan Brindle
rejected Details | Review
vala: Add configure check for vapigen (1.20 KB, patch)
2014-04-18 08:16 UTC, Tristan Brindle
rejected Details | Review
vala: Add metadata file for VAPI generation (874 bytes, patch)
2014-04-18 08:17 UTC, Tristan Brindle
none Details | Review
vala: Add Vapi generation to Makefile.include (1.40 KB, patch)
2014-04-18 08:17 UTC, Tristan Brindle
rejected Details | Review
gom: Rename gom_filter_new_sql() to gom_filter_new_for_sql() (2.46 KB, patch)
2014-09-21 19:28 UTC, Bastien Nocera
none Details | Review
gom: Rename gom_filter_new_sql() to gom_filter_new_for_sql() (3.04 KB, patch)
2017-03-07 14:53 UTC, Bastien Nocera
none Details | Review

Description Tristan Brindle 2014-04-18 08:09:27 UTC
It would be nice to be able to use Gom with Vala. These patches enable initial generation of a Vapi file, but more overrides and/or introspection annotations will probably be needed to make the bindings 100% correct. It also needs Gom to install a pkg-config file, but that's another bug.

Some Vala tests would be nice too.

(First time using git-bz, I hope this works right...)
Comment 1 Tristan Brindle 2014-04-18 08:16:29 UTC
Created attachment 274649 [details] [review]
vala: Add m4/vapigen.m4

Avoids hard dependency on vapigen by including the m4 locally
Comment 2 Tristan Brindle 2014-04-18 08:16:55 UTC
Created attachment 274650 [details] [review]
vala: Add configure check for vapigen

Minimum version is 0.20, it might work with older versions but I
can't check
Comment 3 Tristan Brindle 2014-04-18 08:17:18 UTC
Created attachment 274651 [details] [review]
vala: Add metadata file for VAPI generation

Currently only renames "gom_filter_new_sql" constructor to "new_for_sql"
to avoid a clash with the Filter.sql property. More overrides will
probably be needed for correct vapi generation, however
Comment 4 Tristan Brindle 2014-04-18 08:17:48 UTC
Created attachment 274652 [details] [review]
vala: Add Vapi generation to Makefile.include

VAPI generation relies on introspection, so put this within the
HAVE_INTROSPECTION conditional. This is probably a bit redundant
as configure should already check this for us, but better safe
than sorry.
Comment 5 Tristan Brindle 2014-04-18 08:26:42 UTC
Ah, didn't spot there's already a pkg-config file hidden in data/, ignore that bit :-)
Comment 6 Bastien Nocera 2014-04-18 08:31:55 UTC
I would really rather use the gobject-introspection support in Vala so that I don't need to ship this with gom.
Which means fixing the not-so-introspectable code in gom, and maybe fixing bugs in vala.
Comment 7 Bastien Nocera 2014-09-21 19:28:35 UTC
Created attachment 286751 [details] [review]
gom: Rename gom_filter_new_sql() to gom_filter_new_for_sql()

To avoid a clash for introspected languages.
Comment 8 Bastien Nocera 2014-09-21 19:30:19 UTC
Comment on attachment 274651 [details] [review]
vala: Add metadata file for VAPI generation

Obsoleted by the patch that just renames the function instead.
Comment 9 Bastien Nocera 2014-09-21 19:33:18 UTC
I won't take any patches to add Vala support in gom itself. You can either add that to vala itself, or use Vala's gobject-introspection support.

If there are any more clashes or API problems, please file new bugs (once this one is merged).
Comment 10 Mathieu Bridon 2015-01-01 14:54:50 UTC
Review of attachment 286751 [details] [review]:

::: gom/gom-filter.h
@@ +70,3 @@
                                        GHashTable   *table_map);
 GArray      *gom_filter_get_values    (GomFilter    *filter);
+GomFilter   *gom_filter_new_for_sql   (const gchar  *sql,

All the other public constructors are called gom_filter_new_foobar, rather than gom_filter_new_for_foobar.

Maybe it would be better to instead rename the internal sql property?

This would have the added benefit of not breaking the API.
Comment 11 Bastien Nocera 2015-01-05 15:10:41 UTC
(In reply to comment #10)
> Review of attachment 286751 [details] [review]:
> 
> ::: gom/gom-filter.h
> @@ +70,3 @@
>                                         GHashTable   *table_map);
>  GArray      *gom_filter_get_values    (GomFilter    *filter);
> +GomFilter   *gom_filter_new_for_sql   (const gchar  *sql,
> 
> All the other public constructors are called gom_filter_new_foobar, rather than
> gom_filter_new_for_foobar.
> 
> Maybe it would be better to instead rename the internal sql property?

If it's only supposed to be used internally, maybe we could move it to private headers instead (see also gom-resource-priv.h)

> This would have the added benefit of not breaking the API.

That's still breaking API but I see what you mean.
Comment 12 Bastien Nocera 2017-03-07 14:53:58 UTC
Created attachment 347397 [details] [review]
gom: Rename gom_filter_new_sql() to gom_filter_new_for_sql()

To avoid a clash for introspected languages.
Comment 13 Christian Hergert 2017-03-07 19:34:32 UTC
Review of attachment 347397 [details] [review]:

are we worried about abi? should we add an alias with (skip)?
Comment 14 Bastien Nocera 2017-03-07 20:36:38 UTC
(In reply to Christian Hergert from comment #13)
> Review of attachment 347397 [details] [review] [review]:
> 
> are we worried about abi? should we add an alias with (skip)?

This is in the blockers for API changes, probably for a 0.4 API. There are quite a few other changes that we'd need to do first though.
Comment 15 GNOME Infrastructure Team 2019-03-20 10:37:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gom/issues/1.