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 705608 - FolksTelepathy: tpf_persona_get_contact: return value: Missing (transfer) annotation
FolksTelepathy: tpf_persona_get_contact: return value: Missing (transfer) ann...
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: Telepathy backend
0.9.x
Other Linux
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
: 706528 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-08-07 11:45 UTC by Andrey Ponomarenko
Modified: 2013-09-24 21:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Generate backends’ GIR files using valac rather than g-ir-scanner (10.25 KB, patch)
2013-08-07 12:59 UTC, Philip Withnall
committed Details | Review

Description Andrey Ponomarenko 2013-08-07 11:45:32 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);
Comment 1 Philip Withnall 2013-08-07 12:59:06 UTC
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.
Comment 2 Philip Withnall 2013-08-22 01:43:55 UTC
*** Bug 706528 has been marked as a duplicate of this bug. ***
Comment 3 Xavier Claessens 2013-09-24 15:10:35 UTC
Any reason that patch is not merged yet? It looks good to me.
Comment 4 Xavier Claessens 2013-09-24 16:13:59 UTC
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{} ?
Comment 5 Travis Reitter 2013-09-24 21:01:29 UTC
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(-)
Comment 6 Travis Reitter 2013-09-24 21:03:27 UTC
Review of attachment 251068 [details] [review]:

Applied (with subtle fixes)