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 710561 - giscanner: Correctly consume field array annotations on structs
giscanner: Correctly consume field array annotations on structs
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
: 594294 687545 (view as bug list)
Depends on:
Blocks: 678663 688792
 
 
Reported: 2013-10-20 18:54 UTC by Stef Walter
Modified: 2015-02-07 16:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
giscanner: Correctly consume field annotations on structs (10.67 KB, patch)
2013-10-20 18:54 UTC, Stef Walter
committed Details | Review
giscanner: Test fixups for field annotations and documentation (5.91 KB, patch)
2013-10-28 21:15 UTC, Stef Walter
committed Details | Review
giscanner: Correctly consume field annotations on structs (15.96 KB, patch)
2013-11-02 13:24 UTC, Stef Walter
none Details | Review

Description Stef Walter 2013-10-20 18:54:33 UTC
Currently array annotations on struct fields are completely ignored, 
due to a hidden internal exception in the code.
Comment 1 Stef Walter 2013-10-20 18:54:36 UTC
Created attachment 257777 [details] [review]
giscanner: Correctly consume field annotations on structs

A hidden exception was being thrown (which we now log), due to fields
being treated as function parameters. Fixed to make field array
annotations be transformed and written out to the gir correctly.
Comment 2 Colin Walters 2013-10-21 19:20:46 UTC
Review of attachment 257777 [details] [review]:

Only one very minor comment.

::: giscanner/girwriter.py
@@ +315,3 @@
+                    length = parent.get_field_index(ntype.length_param_name)
+                else:
+                    assert False, "parent not a callable or compound: %s" % str(parent)

%r is used more often than %s + str()

::: giscanner/maintransformer.py
@@ +142,3 @@
+                "can't find field %s referenced by %s of %r"
+                % (field_name, origin_name, parent.name))
+

I'm a little uncertain about making this hard fatal, but let's just see what happens; if we need to downgrade to a warning we can do it later.

@@ -733,1 @@
 

Ouch, it's definitely evil to just eat exceptions like this.  Thanks for fixing this.
Comment 3 Simon Feltman 2013-10-23 02:47:40 UTC
*** Bug 687545 has been marked as a duplicate of this bug. ***
Comment 4 Stef Walter 2013-10-28 19:59:03 UTC
Attachment 257777 [details] pushed as 2a569cb - giscanner: Correctly consume field annotations on structs
Comment 5 Stef Walter 2013-10-28 21:15:03 UTC
Created attachment 258344 [details] [review]
giscanner: Test fixups for field annotations and documentation

Related to:
Comment 6 Colin Walters 2013-10-28 21:28:23 UTC
Review of attachment 258344 [details] [review]:

Looks reasonable to me.  Thanks!
Comment 7 Stef Walter 2013-10-29 08:52:17 UTC
Comment on attachment 258344 [details] [review]
giscanner: Test fixups for field annotations and documentation

Pushed by colin to master.
Comment 8 Stef Walter 2013-11-02 13:24:43 UTC
Created attachment 258797 [details] [review]
giscanner: Correctly consume field annotations on structs

Patch for gnome-3-8 branch in case anyone needs it.
Comment 9 Simon Feltman 2013-12-29 23:17:38 UTC
*** Bug 594294 has been marked as a duplicate of this bug. ***
Comment 10 André Klapper 2015-02-07 16:46:52 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]