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



On Sun, Dec 19, 2010 at 06:59:56PM +0100, Abderrahim Kitouni wrote:
> 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.

It should work if you provide two .gir, in what sense "it doesn't work"?

> 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?

Actually in the same directory as the .gir. There's no plan to install
metadata until we don't have any in the vala tree itself, at least for now.
In the switch-to-gir branch there's a patch for --metadatadir option.

>   * Is it a good idea to include (but not install) a metadata file for
> gtk, to work around bugs? (such as 635287)

As said before, yes makes sense but as vala still uses .gi there's no plan
for that yet.

> 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.

True, that should have been re-fixed due to the refactoring and totally
forgot that, shame on reviewers :P (and on me).

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

Yes, please reopen it.

-- 
http://www.debian.org - The Universal Operating System

Attachment: signature.asc
Description: Digital signature



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