GNOME Bugzilla – Bug 702490
Backend support libraries don't have their own gobject-introspection bindings
Last modified: 2013-07-01 23:58:07 UTC
The backend support libraries, like libfolks-telepathy, don't have their own gobject-introspection bindings, making them unusable through introspection. This apparently hadn't come up before because they were usable from C and Vala, but this is a fairly glaring omission (and we hopefully didn't discourage some client developers before they started).
Created attachment 247501 [details] [review] Create GIR files for each of the relevant backend support libraries Patch from branch: http://cgit.collabora.com/git/user/treitter/folks.git/log/?h=bgo702490-ship-girs-8 This creates GIRs for the Tp, Eds, LSW, and Tracker backend support libraries. I haven't tested it /extensively/, but the generated GIR files look approximately right and they at least work as far as being able to reference and successfully check whether a given Folks.Persona is a Tpf.Persona, Edsf.Persona, Swf.Persona, or Trf.Persona from JS (which couldn't do that before this branch).
Review of attachment 247501 [details] [review]: What’s the purpose of putting the introspection build stuff in introspection.am files? To my mind, it makes the autofoo harder to read for no discernible advantage. ::: backends/eds/lib/introspection.am @@ +15,3 @@ + $(NULL) + +EDSF_GIR = FolksEds-0.6.gir Why ‘0.6’? The API version? Couldn’t this be abstracted out so it’s not hard-coded everywhere? See how libgdata does it: https://git.gnome.org/browse/libgdata/tree/Makefile.am#n488 @@ +32,3 @@ +FolksEds_0_6_gir_LIBS = libfolks-eds.la +FolksEds_0_6_gir_FILES = \ +$(libfolks_eds_la_SOURCES) \ Dodgy indentation. ::: folks/folks-namespace.vala @@ +19,3 @@ + */ + +[CCode (gir_namespace = "Folks", gir_version = "0.6")] This could do with a block comment explaining that the file’s necessary to namespace things correctly, and is intentionally otherwise empty.
Created attachment 247671 [details] [review] Updated branch which factors in Philip's review Review-accounted-for patch from branch: http://cgit.collabora.com/git/user/treitter/folks.git/log/?h=bgo702490-ship-girs-12
Review of attachment 247671 [details] [review]: Still a few bits to tweak, I think. ::: backends/eds/lib/Makefile.am @@ +179,3 @@ +MAINTAINERCLEANFILES += \ + $(dist_gir_DATA) \ + $(NULL) Seems a bit odd to have the CLEANFILES directly above on a single line, but split this one up. Could make MAINTAINERCLEANFILES a single line too, since it’s very unlikely to be modified in future (for just the introspection stuff). ::: backends/telepathy/lib/Makefile.am @@ +22,3 @@ +dist_noinst_DATA = \ + $(NULL) Eww. This could just be “dist_noinst_DATA =\n\n” @@ +61,2 @@ if HAVE_VALA +tp-lowlevel.vapi: TpLowlevel-0.6.gir 0.6?
Created attachment 247683 [details] [review] Update 2 Patch from branch: http://cgit.collabora.com/git/user/treitter/folks.git/log/?h=bgo702490-ship-girs-12
Review of attachment 247683 [details] [review]: Looks good. OK by me to commit as long as it passes distcheck and building from a tarball with and without srcdir != builddir. Don’t forget to update NEWS.
Whoops, merged this before 0.9.3 but forgot to close this bug: commit 6b13ff00c0f9e9fb1729c87aa5b92982933f37e2 Author: Travis Reitter <travis.reitter@collabora.co.uk> Date: Mon Jun 24 16:24:24 2013 -0700 Added GIR bindings for the backend support libraries Bug: https://bugzilla.gnome.org/show_bug.cgi?id=702490 NEWS | 2 ++ 1 file changed, 2 insertions(+) commit e963463c22dc9b0bb23dd9dc8f602c65cf78025a Author: Travis Reitter <travis.reitter@collabora.co.uk> Date: Mon Jun 17 18:22:19 2013 -0700 Generate FolksTracker gir file Bug: https://bugzilla.gnome.org/show_bug.cgi?id=702490 backends/tracker/lib/Makefile.am | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 82ce4aaa2b4c04701cafc428c15bd8eac770f32c Author: Travis Reitter <travis.reitter@collabora.co.uk> Date: Mon Jun 17 17:49:24 2013 -0700 Generate FolksLibsocialweb gir file Bug: https://bugzilla.gnome.org/show_bug.cgi?id=702490 backends/libsocialweb/lib/Makefile.am | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 2616fa0cfb54fa082f59aecada0ffc65f521328f Author: Travis Reitter <travis.reitter@collabora.co.uk> Date: Mon Jun 17 11:40:36 2013 -0700 Generate FolksEds gir file Bug: https://bugzilla.gnome.org/show_bug.cgi?id=702490 backends/eds/lib/Makefile.am | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 333b534cca278496777035f523dd1549fdd23220 Author: Travis Reitter <travis.reitter@collabora.co.uk> Date: Fri Jun 14 09:50:00 2013 -0700 Generate FolksTelepathy gir file Bug: https://bugzilla.gnome.org/show_bug.cgi?id=702490 backends/telepathy/lib/Makefile.am | 131 ++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 94 insertions(+), 37 deletions(-) commit 66844b833f37c489cabf47a0ec27845828d83860 Author: Travis Reitter <travis.reitter@collabora.co.uk> Date: Fri Jun 14 17:54:51 2013 -0700 Clean up version and capitalization for TpLowlevel GIR This is required to make it actually usable by FolksTelepathy's GIR Bug: https://bugzilla.gnome.org/show_bug.cgi?id=702490 backends/telepathy/lib/Makefile.am | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit cb23c94e592115f9cb4cad977db9e279fb3abe91 Author: Travis Reitter <travis.reitter@collabora.co.uk> Date: Mon Jun 24 11:11:42 2013 -0700 Split the API version definition so it can be used more extensively Bug: https://bugzilla.gnome.org/show_bug.cgi?id=702490 configure.ac | 8 ++++++-- folks/Makefile.am | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) commit b1735191b8119484488c0deadd3e9c1b9ff38eb0 Author: Travis Reitter <travis.reitter@collabora.co.uk> Date: Fri Jun 21 17:41:24 2013 -0700 Include /folks in PKG_CONFIG_PATH This is required for the gobject-introspection tools to find the folks pkgconfig files. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=702490 configure.ac | 5 +++++ 1 file changed, 5 insertions(+)