Bug 60687

Summary: Build failure caused by wrong introspection annotations
Product: Telepathy Reporter: Debarshi Ray <rishi.is>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: reklov, william.jon.mccann, xclaesse
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Fix introspection annotations for GStrv types

Description Debarshi Ray 2013-02-11 20:16:58 UTC
Example of build failure:
http://pastebin.com/iXvBAhKA

This patch was offered on #telepathy:
http://paste.debian.net/232998/
Comment 1 Debarshi Ray 2013-02-11 20:38:12 UTC
Created attachment 74651 [details] [review]
Fix introspection annotations for GStrv types

Attaching since the pastebin URL will soon expire.
Comment 2 Guillaume Desmottes 2013-02-19 15:47:12 UTC
Thanks for the patch, I merged it to master for 0.21.0.

commit e61dd171562690e6ab0cc411e048f7f511856e6e
Author: Thomas Bechtold <thomasbechtold@jpberlin.de>
Date:   Sat Feb 9 21:50:04 2013 +0100

    Fix introspection annotations for GStrv types
Comment 3 Xavier Claessens 2013-02-19 15:50:34 UTC
Weird that my g-i does not warn about this. g-i tests does not have this case, that's annoying IMO.

Note that tp_account_update_parameters_finish() annotates the same arg with (out) (array zero-terminated=1) (transfer full) which is tested in g-i with regress_test_strv_outarg().

With my g-i version 1.33.14, none of those forms warns:

(out) (array zero-terminated=1) (transfer full):
            <array c:type="gchar***">
              <type name="utf8" c:type="gchar**"/>
            </array>

(out) (GStrv) (transfer full):
            <array c:type="gchar***">
              <type name="utf8"/>
            </array>

(out) (GObject.Strv) (transfer full):
            <type name="GObject.Strv" c:type="gchar***"/>

My preference goes to the former. The latter looks wrong indeed.
Comment 4 Xavier Claessens 2013-02-19 16:02:59 UTC
Ok, with g-i from master indeed I get that build error as well. Actually my preference would be to use (GStrv), like the patch, and add that case in g-i regression tests :-)
Comment 5 Debarshi Ray 2013-02-20 07:25:01 UTC
walters said on IRC that GLib.Strv is the canonical way to spell the type.

NB: I am not a GI expert. I am just relaying info from those who are. :-)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.