After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 572122 - Generated .gir file does not comply gobject-introspection
Generated .gir file does not comply gobject-introspection
Status: RESOLVED DUPLICATE of bug 568951
Product: vala
Classification: Core
Component: general
0.5.x
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-17 10:41 UTC by Didier "Ptitjes"
Modified: 2009-02-22 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This patch make generated gir files compliant to gobject-introspection (11.24 KB, patch)
2009-02-17 10:46 UTC, Didier "Ptitjes"
none Details | Review
Better compliance (12.93 KB, patch)
2009-02-17 15:04 UTC, Didier "Ptitjes"
none Details | Review
Enhance gir compliance (18.00 KB, patch)
2009-02-22 16:13 UTC, Didier "Ptitjes"
none Details | Review

Description Didier "Ptitjes" 2009-02-17 10:41:48 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:
Comment 1 Didier "Ptitjes" 2009-02-17 10:46:52 UTC
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.
Comment 2 Didier "Ptitjes" 2009-02-17 15:04:36 UTC
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.
Comment 3 Jürg Billeter 2009-02-20 09:56:15 UTC
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 ***
Comment 4 Didier "Ptitjes" 2009-02-22 16:13:27 UTC
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