GNOME Bugzilla – Bug 768541
Add support GObject Introspection in templates
Last modified: 2016-08-08 22:14:21 UTC
Almost any library writen in C/GLib or Vala, is a good plus to have GObject Introspection support out of the box. GI provides automatic bindings for C and Vala libraries, for a set of languages, like Python. Then it is a "must have" feature. While I can write down a GI support patch, Builder and libide should add an option for name space setting. Namespace should be an option any way, because any C function should start using a set characters like gtk_ or gsk_, in most cases you have a long project's name but requires a short one for prefix your symbols. For example, when I create a Test project may I want to use Tst as prefix, this is serve as name of Vala, C and for GIR files too.
Agreed. However, the most important part for this feature (its rather quick to plumb in support for), is to figure out how the UI would look as part of the project creation. CC'ing Allan since we'd need design work for this to land.
Created attachment 331100 [details] [review] Adding Vala lib template for GObject Introspection It is in my local repository for 3.20 branch. Ready to push if agree.
Review of attachment 331100 [details] [review]: Seems reasonable. Would just like to avoid the shell code though. ::: plugins/autotools-templates/autotools_templates/resources/src/Makefile.shared-library-vala @@ +57,3 @@ + `$(SED) -n "s/^dlname='\([A-Za-z0-9.+-]\+\)'/\1/p" lib{{name_}}-@API_VERSION@.la` + +INTROSPECTION_COMPILER_ARGS = --includedir=. -l $(lib_dlname) Why not just use {{name_}}-@API_VERSION@ here instead of the sed command? I'd want to avoid open coded shell in our makefiles as much as possible.
This bug is obsolete due to fixes on Bug #766621. *** This bug has been marked as a duplicate of bug 766621 ***