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 768541 - Add support GObject Introspection in templates
Add support GObject Introspection in templates
Status: RESOLVED DUPLICATE of bug 766621
Product: gnome-builder
Classification: Other
Component: templates
3.21.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-08 01:30 UTC by Daniel Espinosa
Modified: 2016-08-08 22:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adding Vala lib template for GObject Introspection (1.91 KB, patch)
2016-07-08 16:41 UTC, Daniel Espinosa
reviewed Details | Review

Description Daniel Espinosa 2016-07-08 01:30:29 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.
Comment 1 Christian Hergert 2016-07-08 01:33:14 UTC
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.
Comment 2 Daniel Espinosa 2016-07-08 16:41:55 UTC
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.
Comment 3 Christian Hergert 2016-07-08 20:24:48 UTC
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.
Comment 4 Daniel Espinosa 2016-08-08 22:14:21 UTC
This bug is obsolete due to fixes on Bug #766621.

*** This bug has been marked as a duplicate of bug 766621 ***