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 657586 - libpeas (Peas-1.0.gir) FTBFS with latest gobject-introspection
libpeas (Peas-1.0.gir) FTBFS with latest gobject-introspection
Status: RESOLVED FIXED
Product: libpeas
Classification: Platform
Component: general
git master
Other Linux
: Normal critical
: ---
Assigned To: libpeas-maint
libpeas-maint
: 656842 (view as bug list)
Depends on:
Blocks: 657688
 
 
Reported: 2011-08-29 03:24 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2011-08-30 20:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Avoid exposing faked peas_extension_get_type() (1.06 KB, patch)
2011-08-30 13:36 UTC, Pavel Holejsovsky
none Details | Review
Diff of resulting .gir file illustrating impact of the patch (579 bytes, patch)
2011-08-30 13:38 UTC, Pavel Holejsovsky
none Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2011-08-29 03:24:54 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
Comment 1 Pavel Holejsovsky 2011-08-30 13:36:29 UTC
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 :-)
Comment 2 Pavel Holejsovsky 2011-08-30 13:38:55 UTC
Created attachment 195199 [details] [review]
Diff of resulting .gir file illustrating impact of the patch
Comment 3 Steve Frécinaux 2011-08-30 13:41:25 UTC
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.
Comment 4 Pavel Holejsovsky 2011-08-30 15:42:32 UTC
(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.
Comment 5 Steve Frécinaux 2011-08-30 20:49:12 UTC
*** Bug 656842 has been marked as a duplicate of this bug. ***