[Vala] Using Gir instead of vapi (and bug 624923)



Hi all,

I'm trying different ways of using a gir from vala : ideally, the
solution would be easily automated, and not break randomly.

1. use vapigen to generate the vapi : with the addition of metadata
files, this is now possible, but given that my project has 2 namespaces
(and this 2 gir files), it doesn't work (or rather, I didn't find a way
to make it work). The only way I've found is to generate the vapi for
each file and concatenate them : not what I call easily automated.

2. use the gir directly : valac does read metadata files, and thus is
able to use the gir directly. This works (except for bug 624923, see
below), but I have some questions :
  * Where does valac look for metadata files? (I know I can UTSL, but I
want a more definitive answer). Can those be installed somewhere so
everyone can use them? if so, where?
  * Is it a good idea to include (but not install) a metadata file for
gtk, to work around bugs? (such as 635287)

I'd prefer the second solution, but the first one seems more
future-proof. What do you think?

As an aside, while trying the second solution, valac crashed, and when I
tried the first one, I got the "missing class prerequisite" error,
looking through the git log I found that the fix for bug 624923 got
reverted by commit fc7fe82fbd0b19b6caaf (the commit message suggests
this code should be moved after symbol resolution, but only deletes it).
Reverting that commit fixed both.

I guess the bug should be reopened (or a new one opened) if there is a
problem with the patch.

Regards,
Abderrahim

P.S. this may be considered as a user question, but since it's about
"bleeding-edge", I guess here is more appropriate.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]