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 703402 - Backend support libraries don't set the GIR version and namespace
Backend support libraries don't set the GIR version and namespace
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks: 694115
 
 
Reported: 2013-07-01 16:21 UTC by Travis Reitter
Modified: 2013-07-02 00:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set the GIR version and namespace in the support libraries' vapi files (8.68 KB, patch)
2013-07-01 16:26 UTC, Travis Reitter
accepted-commit_now Details | Review

Description Travis Reitter 2013-07-01 16:21:24 UTC
This is essentially an extension of bug #698890 to the backends but actually more serious. That bug only ever generated warnings for clients. This bug can make the backend support libraries unusable from introspected languages.

Without this in place, JavaScript (and probably other introspected) code calling Vala client code can end up mysteriously hitting this error:
    
    CRITICAL **: g_irepository_find_by_name: assertion 'typelib != NULL' failed

because it fails to locate the proper typelib.

So, I'm not 100% sure why it causes this problem but we should be setting the namespace and version and doing so fixes this problem.
Comment 1 Travis Reitter 2013-07-01 16:26:15 UTC
Created attachment 248163 [details] [review]
Set the GIR version and namespace in the support libraries' vapi files

Patches from branch:

http://cgit.collabora.com/git/user/treitter/folks.git/log/?h=bgo703402-add-namespace-versions
Comment 2 Philip Withnall 2013-07-01 18:28:31 UTC
Review of attachment 248163 [details] [review]:

Go for it.

::: NEWS
@@ +8,3 @@
 Bugs fixed:
 • Bug 699865 — Folks needs to expose chat/VoIP service client types
+• Added GIR namespace and API version to backend support libraries' vapi files

Needs the bug number.
Comment 3 Travis Reitter 2013-07-02 00:47:54 UTC
commit bfec44aba7d7ad3dae9acb5dc811186880984e38
Author: Travis Reitter <travis.reitter@collabora.co.uk>
Date:   Thu Jun 27 15:57:33 2013 -0700

    Add namespace and version to libfolks-tracker GIR
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703402

 NEWS                                    |  1 +
 backends/tracker/lib/Makefile.am        |  1 +
 backends/tracker/lib/trf-namespace.vala | 30 ++++++++++++++++++++++++++++++
 3 files changed, 32 insertions(+)

commit 2e68ed13a6155af34ff5a76b03b0fd1f5f17d796
Author: Travis Reitter <travis.reitter@collabora.co.uk>
Date:   Thu Jun 27 15:31:03 2013 -0700

    Add namespace and version to libfolks-libsocialweb GIR
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703402

 backends/libsocialweb/lib/Makefile.am        |  1 +
 backends/libsocialweb/lib/swf-namespace.vala | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

commit 2579f677bdc28a319589f24960abe6f53cfb9564
Author: Travis Reitter <travis.reitter@collabora.co.uk>
Date:   Thu Jun 27 15:26:55 2013 -0700

    Add namespace and version to libfolks-eds GIR
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703402

 backends/eds/lib/Makefile.am         |  1 +
 backends/eds/lib/edsf-namespace.vala | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

commit abf23432c4c7dc289e10f338a4b323e7ccd3cd43
Author: Travis Reitter <travis.reitter@collabora.co.uk>
Date:   Thu Jun 27 11:50:53 2013 -0700

    Add namespace and version to libfolks-telepathy GIR
    
    Without this in place, JavaScript (and probably other introspected) code
    calling Vala client code can end up mysteriously hitting this error:
    
    CRITICAL **: g_irepository_find_by_name: assertion 'typelib != NULL' failed
    
    because it fails to locate the proper typelib.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703402

 backends/telepathy/lib/Makefile.am        |  1 +
 backends/telepathy/lib/tpf-namespace.vala | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)