Bug 60687 - Build failure caused by wrong introspection annotations
Summary: Build failure caused by wrong introspection annotations
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-11 20:16 UTC by Debarshi Ray
Modified: 2013-02-20 07:25 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix introspection annotations for GStrv types (1.53 KB, patch)
2013-02-11 20:38 UTC, Debarshi Ray
Details | Splinter Review

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.