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 616729 - Vala Bindings
Vala Bindings
Status: RESOLVED FIXED
Product: emerillon
Classification: Other
Component: General
git master
Other All
: Normal normal
: ---
Assigned To: emerillon-maint
emerillon-maint
Depends on:
Blocks:
 
 
Reported: 2010-04-24 19:45 UTC by Simon Wenner
Modified: 2010-04-25 18:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vala bindings patch (3.49 KB, patch)
2010-04-24 19:45 UTC, Simon Wenner
none Details | Review
additional patch to generate the vapi file (6.27 KB, patch)
2010-04-25 14:28 UTC, Simon Wenner
none Details | Review
patch (384 bytes, patch)
2010-04-25 17:12 UTC, Simon Wenner
none Details | Review

Description Simon Wenner 2010-04-24 19:45:27 UTC
Created attachment 159482 [details] [review]
vala bindings patch

Champlain and Ethos officially ship Vala bindings. I would like to create vala plugins whithout the need of addtional vapi files. The attached patch adds the installation of emerillon's vala binding (disabled by default).

The autogenerated file 'emerillon.vapi' was copied from Tomaž's emerillon-plugins git clone. http://gitorious.org/~quikee/emerillion/quikees-emerillon-plugins/
Comment 1 Łukasz Jernaś 2010-04-25 06:46:34 UTC
Couldn't the .vapi file be autogenerated at buildtime? Or are soem custom changes included in it?
Comment 2 Simon Wenner 2010-04-25 14:28:12 UTC
Created attachment 159512 [details] [review]
additional patch to generate the vapi file

The vapi files was generated with vala's introspection tools.

In theory, you can generate vala bindings from introspection data at buildtime, but this process does not seem to work reliably at the moment. I don't know of any project that uses it. It still needs more love :-)

But I agree that the file should be regeneratable. emerillon.vapi includes customisations. Mostly hiding private symbols.

The attached second patch (applies on top of the first one) adds all config files that are needed and a script (one line) to regenerate the vapi file. All customisations are defined in emerillon/emerillon.metadata.

Docu: http://live.gnome.org/Vala/Bindings
Comment 3 Łukasz Jernaś 2010-04-25 16:54:50 UTC
Thank you for the patches! Pushed to master. I've changed the configure check to detect vala at buildtime instead of hardcoding yes or no. Hope you don't mind :)
Comment 4 Simon Wenner 2010-04-25 16:58:20 UTC
I don't mind. :-) 

Thanks.
Comment 5 Simon Wenner 2010-04-25 17:12:59 UTC
Created attachment 159520 [details] [review]
patch

Hm, I think your new check is not correct. libvala is only used by vala developers and not a dependancy of any vala application (only the compiler). Hardly anybody installs it.

What about checking for the Vala compiler? -> patch
Comment 6 Łukasz Jernaś 2010-04-25 17:40:27 UTC
Hmm, if we require the compiler we require also libvala (as it is it's dependency). The pkgconfig file for libvala provides us with the path to vala-gen-introspect. Maybe we should check for both?
Comment 7 Simon Wenner 2010-04-25 17:59:04 UTC
libvala is only needed to create compiler and tools that work with or generate vala code. The only packages that depend on it on my system are valac and vala-tools.

I created several Vala applications and plugins and I never installed libvala-dev on my system. i.e. Emerillon will not depend on libvala.

Vala adds no additional runtime requirements to an applications. Is calls just the unmodified C libraries. The vapi files are only used at compile time. A vala developer (on Debian) only needs to install 'valac' and no additional packages. The package valac also provides the vapi files for most of the GNOME stack. A user that runs a compiled Vala application (or plugin) will not need any additional dependencies (no vala or vapi files). It behaves as it was written in C. That's the beauty of Vala :-)
Comment 8 Łukasz Jernaś 2010-04-25 18:14:18 UTC
Pushed as f80d42ba0c97d1c7babb76f6f55c7328d8dc1f7b