Re: [Vala] g-ir-compiler compatibility with valac generated gir files



On Tue, Oct 12, 2010 at 14:39:39 -0700, Evan Nemerson wrote:
On Tue, 2010-10-12 at 13:15 -0700, Nigel Griffin wrote:
Hi,

I'm using the latest g-ir-compiler g-object-introspection's git
repositoty.  However, even with a gir file generated from a minimal
vala class causes g-ir-compiler to crash.  Is there a known good
version of g-ir-compiler that the gir files generated from valac will
work with?

I'm also using the latest valac (which was updated recently to work
with never g-ir-compiler versions).

The vala code for the test class is very basic:

public class TestClass : Object
{
}

I believe GIR requires you to place your content in a namespace.

Not only that, but it has to be one namespace per file and nesting is not
possible. And the generated .typelib will be named by the namespace. And you
can't have more than one .gir with the same namespace.

I think vala should either:
 - Set the namespace from the gir file name.
   - If there is more than one namespace to write, the type names should than
     include the namespace prefix.
 - Or use the namespace name as basename for the gir.

The gir namespaces are really the names of libraries, so I think the first
option would be better.

-- 
                                                 Jan 'Bulb' Hudec <bulb ucw cz>



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