GNOME Bugzilla – Bug 657586
libpeas (Peas-1.0.gir) FTBFS with latest gobject-introspection
Last modified: 2011-08-30 20:49:12 UTC
Fails with: <unknown>:: Fatal: Peas: Skipping foreign identifier 'GObject' from namespace GModule Reverting this commit in g-i allows libpeas to build, i'm filing this against libpeas although it might be g-i's fault. commit e0fea819f0da1ca60cce3280e7e21f3d2955be3a Author: Pavel Holejsovsky <pholejs@src.gnome.org> Date: Sun Aug 28 11:44:52 2011 +0200 Avoid most of the special-casing of GObject.Object in the scanner There were some cases of handling GObject and GInitiallyUnowned which were not necessary. Removing special cases from them simplified code and as a bonus it added 'GObject::notify' signal into GIR, which was not there previously. https://bugzilla.gnome.org/show_bug.cgi?id=657446
Created attachment 195196 [details] [review] Avoid exposing faked peas_extension_get_type() peas_extension_get_type() is faked and returns G_TYPE_OBJECT. This confuses g-ir-scanner enough to fail compilation, because it is unable to associate resulting 'GObject' symbol with 'Peas' namespace. This problem was uncovered by the change in the scanner referenced in the description of this bug. Solve it by hiding peas_extension_get_type() from scanner. Note that libpeas maintainers might want to remove peas-extension.h from introspection sources completely, because entries produced by it in the .gir are rather pathetic :-)
Created attachment 195199 [details] [review] Diff of resulting .gir file illustrating impact of the patch
Review of attachment 195196 [details] [review]: I'm ok to remove peas-extension.h completely from introspection but I'm afraid of breaking ABI/API compatibility. But since I guess removing the _get_type function is breaking it anyway, let's do it.
(In reply to comment #3) > Review of attachment 195196 [details] [review]: > > I'm ok to remove peas-extension.h completely from introspection but I'm afraid > of breaking ABI/API compatibility. But since I guess removing the _get_type > function is breaking it anyway, let's do it. I tried removing peas-extension.[ch] from introspection_sources, but resulting .gir was strange, because PeasExtension alias was completely missing, but still referenced by some other elements as <type c:type="PeasExtension*">, which looks unhealthy (sane declaration would be <type name="Extension" c:type="PeasExtension">. So I'd suggest to use patch from comment#1 Yet another solution, which seems rather clean could be to add -DPEAS_DISABLE_DEPRECATED to scanner's flags. But I'm not sure whether this is better, it is now up to libpeas maintainers to decide.
*** Bug 656842 has been marked as a duplicate of this bug. ***