GNOME Bugzilla – Bug 572122
Generated .gir file does not comply gobject-introspection
Last modified: 2009-02-22 16:13:27 UTC
Please describe the problem: .gir file generated by Valac does not comply to gobject-introspection in the following ways: - There must be one .gir file per namespace - glib:type-name attribute is mandatory on interfaces and enums (not just classes) - transfer-ownership attributes are mandatory - string type maps to utf8 - .gir filename must match the <namespace name=""> contained - No dots are allowed in namespace names Steps to reproduce: 1. do valac --library 2. compile the generated gir file with g-ir-compiler Actual results: g-ir-compiler complains for all the things in the above problem description Expected results: File to be compiled correctly :) Does this happen every time? It does Other information:
Created attachment 128894 [details] [review] This patch make generated gir files compliant to gobject-introspection Some important notes : 1. Adds a --typelib VERSION compiler option. This triggers the generation of gir files Namespace-VERSION.gir and should later directly call g-ir-compiler directly in Valac, as recommended by g-i team. 2. Generates one gir file per namespace. 3. Generates xml namespaces correctly. 4. In addition, this patch adds custom metadata (like dbus annotations) to the generated gir files.
Created attachment 128903 [details] [review] Better compliance Now generates 1 file per valac call. GI's namespace name is the one given in --library NAMESPACE-VERSION. Now has compliance for generics support in g-i.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of 568951 ***
Created attachment 129264 [details] [review] Enhance gir compliance - Merges patches from #572122 and #568951) - Add c:identifier for enum values and constant - Handles interfaces static methods