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



On Mon, Dec 20, 2010 at 06:28:41PM +0100, Abderrahim Kitouni wrote:
> It is now working with the latest switch-to-gir.

Ok thanks will push that to master soon.

> What's the plan for metadata in vala? Is is supposed to "replace" vapi
> for libraries using g-i? I mean, are we going to use gir+metadata for
> libraries using g-i? This would seems logical as G-I is becoming the
> standard for bindings, and it would be otherwise difficult to convince
> everybody to generate vapis (but would be easier to include and install
> simple metadata files). But these would need some place where valac will
> automatically look for them (so no "anjuta specific directory" ;-)).

The real future "impossible" plan is to only use the gir (no metadata and
possibly no -custom), thinking it will
completely map well into vala by getting bugs fixed upstream and there are
obvious problems:
1) We always forward bugs upstream, but it will take time to get the fix,
while we could fix it in metadata faster.
2) Not everything maps into vala, they are two different languages, it's
almost impossible that you will get a 1:1 mapping, especially until GI
support nested namespaces and so on

Hence the need of metadata and -custom, otherwise we'd stick with gidl
forever.

So the realistic long-term plan is to drop gidl
(or at least keep it until gir does not support everything gidl actually
support).
We're working on porting gio and creating the first binding for cally using
gir, but before that we need a better gir parser (that's the reason of
the bunch of commits and work we're doing, and it's still incomplete).
On the other hand, it's not immediate to always use gir instead of the vapi,
and the reasons are simple:
1) vapi are way faster to parse
2) vapi are way easier to read as reference documentation
So we could provide a place for metadata, but vapi are still needed in my
opinion.

You know, there's a lot of work to do as it doesn't only involve gir parsing
but also other code refactoring (like my recent mail about the policy on
handling external symbols), but this is where we're heading to,
just to as fast as you'd expect but the day will come :)

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