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 762899 - libpeas should allow setting properties from prerequisite types
libpeas should allow setting properties from prerequisite types
Status: RESOLVED FIXED
Product: libpeas
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: libpeas-maint
libpeas-maint
Depends on:
Blocks:
 
 
Reported: 2016-02-29 23:25 UTC by Christian Hergert
Modified: 2017-03-25 04:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Consider all an interfaces potential properties (16.19 KB, patch)
2016-03-02 19:18 UTC, Garrett Regier
none Details | Review
Consider all an interfaces potential properties v2 (17.21 KB, patch)
2017-03-17 18:31 UTC, Garrett Regier
committed Details | Review

Description Christian Hergert 2016-02-29 23:25:50 UTC
Currently, if an extension interface has a prerequisite other than GObject, it might have additional properties. Unless these properties are "overridden" in the interface, they cannot be set during extension construction.

In Builder, this has resulted in some nasty workarounds, especially when integrating with Vala (which expects set_*() vfuncs for interface properties).
Comment 1 Garrett Regier 2016-03-02 19:18:57 UTC
Created attachment 322910 [details] [review]
Consider all an interfaces potential properties

An interface can have a prerequisite which is derived from GObject an as such is not an interface.

----

All prerequisites which are an interface were already being checked, now expand that to all GObject derived types.
Comment 2 Ignacio Casal Quinteiro (nacho) 2016-03-02 19:51:47 UTC
Review of attachment 322910 [details] [review]:

Go ahead.

::: tests/libpeas/introspection/introspection-prerequisite.c
@@ +30,3 @@
+} IntrospectionPrerequisitePrivate;
+
+G_DEFINE_TYPE_WITH_PRIVATE (IntrospectionPrerequisite,

in general I would go these days with G_DEFINE_TYPE and making it a final type. Though if you do it for consistency I am fine with it.
Comment 3 Garrett Regier 2017-03-17 18:31:51 UTC
Created attachment 348202 [details] [review]
Consider all an interfaces potential properties v2

This fixes an issue where multiple interfaces specify a GObject prerequisite. We now pick the descendant of the two GTypes.
Comment 4 Christian Hergert 2017-03-25 04:17:14 UTC
Review of attachment 348202 [details] [review]:

Thanks all looks good to me
Comment 5 Garrett Regier 2017-03-25 04:29:31 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.