GNOME Bugzilla – Bug 705608
FolksTelepathy: tpf_persona_get_contact: return value: Missing (transfer) annotation
Last modified: 2013-09-24 21:03:27 UTC
New build error introduced in 0.9.3 and 0.9.4: $>./configure $> make ... make TpLowlevel-0.6.gir make[5]: Entering directory `/home/user/libfolks/install/folks-0.9.4/backends/telepathy/lib' make[5]: `TpLowlevel-0.6.gir' is up to date. make[5]: Leaving directory `/home/user/libfolks/install/folks-0.9.4/backends/telepathy/lib' GEN tp-lowlevel.vapi Generation succeeded - 0 warning(s) touch tp-lowlevel.vapi VALAC libfolks_telepathy_la_vala.stamp CC libfolks_telepathy_la-tpf-namespace.lo CC libfolks_telepathy_la-tpf-persona.lo CC libfolks_telepathy_la-tpf-persona-store.lo CC libfolks_telepathy_la-tpf-logger.lo CC libfolks_telepathy_la-tpf-persona-store-cache.lo CC libfolks_telepathy_la-tp-lowlevel.lo CC libtp_zeitgeist_la-tp-zeitgeist.lo CCLD libtp-zeitgeist.la CCLD libfolks-telepathy.la GISCAN FolksTelepathy-0.6.gir folks/folks-telepathy.h:68: Warning: FolksTelepathy: tpf_persona_get_contact: return value: Missing (transfer) annotation folks/folks-telepathy.h:64: Warning: FolksTelepathy: tpf_persona_construct: return value: Missing (transfer) annotation folks/folks-telepathy.h:65: Warning: FolksTelepathy: tpf_persona_dup_for_contact: return value: Missing (transfer) annotation folks/folks-telepathy.h:73: Warning: FolksTelepathy: tpf_persona_store_get_account: return value: Missing (transfer) annotation folks/folks-telepathy.h:70: Warning: FolksTelepathy: tpf_persona_store_construct: return value: Missing (transfer) annotation folks/folks-telepathy.h:71: Warning: FolksTelepathy: tpf_persona_store_list_persona_stores: return value: Missing (transfer) annotation folks/folks-telepathy.h:72: Warning: FolksTelepathy: tpf_persona_store_dup_for_account: return value: Missing (transfer) annotation <unknown>:: Fatal: FolksTelepathy: warnings configured as fatal <unknown>:: Fatal: FolksTelepathy: warnings configured as fatal make[4]: *** [FolksTelepathy-0.6.gir] Error 1 make[4]: Leaving directory `/home/user/libfolks/install/folks-0.9.4/backends/telepathy/lib' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/user/libfolks/install/folks-0.9.4/backends/telepathy' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/user/libfolks/install/folks-0.9.4/backends' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/user/libfolks/install/folks-0.9.4' make: *** [all] Error 2 Environment: Linux, x86, GCC 4.6.1, Gir 1.37.4, Vala 0.21.1, Zeitgeist 0.9.14, telepathy-glib 0.21.1 (with --enable-vala-bindings), evolution-data-server 3.9.1 (with --enable-vala-bindings);
Created attachment 251068 [details] [review] Generate backends’ GIR files using valac rather than g-ir-scanner You can work around this by configuring folks with --disable-fatal-warnings. However, it’s a bug in how folks generates .gir files. We should be using valac to generate them during compilation, rather than using g-ir-scanner after the fact (and after we’ve thrown away a large amount of type information). This patch does that for all backends.
*** Bug 706528 has been marked as a duplicate of this bug. ***
Any reason that patch is not merged yet? It looks good to me.
Actually tested the patch and it does not work, the .gir file is not generated. Googling for why that could happen and I found: http://stackoverflow.com/questions/3030566/how-to-generate-gir-files-from-the-vala-compiler Do we need to wrap all vala code into the namespace{} ?
Applied with subtle fixes: commit f707b604734f787692cf94a7daffb4edf349a476 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Wed Aug 7 14:54:56 2013 +0200 build: Generate backends’ GIR files using valac rather than g-ir-scanner Vala knows more about the types used in the code, and doesn’t emit any GIR annotations; so g-ir-scanner is left guessing about (transfer) annotations (amongst others). Closes: https://bugzilla.gnome.org/show_bug.cgi?id=705608 NEWS | 2 ++ backends/eds/lib/Makefile.am | 44 +++++++--------------------- backends/libsocialweb/lib/Makefile.am | 40 ++++++------------------- backends/telepathy/lib/Makefile.am | 55 ++++++----------------------------- backends/tracker/lib/Makefile.am | 40 ++++++------------------- 5 files changed, 39 insertions(+), 142 deletions(-)
Review of attachment 251068 [details] [review]: Applied (with subtle fixes)