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 677591 - Gir parser does not resolve symbols on namespace conflicts
Gir parser does not resolve symbols on namespace conflicts
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: GObject Introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-06 23:02 UTC by Alberto Ruiz
Modified: 2018-05-22 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
An example code that triggers this bug (204 bytes, text/x-vala)
2014-05-31 17:26 UTC, raster
Details

Description Alberto Ruiz 2012-06-06 23:02:23 UTC
While trying to write proper metadata for the NetworkManager bindings, I stumbled upon the following error output:


NMClient-1.0.gir:129.85-129.85: error: The type name `DBus.Connection' could not be found
            <type name="DBusGLib.Connection" c:type="DBusGConnection*"/>

The cause of the problem is that I am declaring a NM.DBus namespace in a previous vapi/metadata file (for the NetworkManager-1.0.gir file, on which NMClient-1.0.gir depends):

DBUS_*                    parent="NM.DBus"     cheader_filename="NetworkManager.h"     name="DBUS_(.+)"
DBUS_PATH_VPN             parent="NM.DBus"     cheader_filename="NetworkManagerVPN.h"  name="DBUS_(.+)"
DBUS_PATH_VPN_CONNECTION  parent="NM.DBus"     cheader_filename="NetworkManagerVPN.h"  name="DBUS_(.+)"
DBUS_VPN_*                parent="NM.DBus.VPN" cheader_filename="NetworkManagerVPN.h"  name="DBUS_VPN_(.+)"


Apparently the girparser won't be able to find DBus.Connection since it thinks that the Connection symbol should be inside NM.DBus.
Comment 1 raster 2014-05-31 10:50:33 UTC
I had exactly the same problem writing a plugin for the scratch text editor: my namespace was "Autovala.Scratch", and Vala compiler was unable to find "Scratch.Services.Interface". When I changed the namespace to "AutovalaScratch", everything worked like a charm.
Comment 2 raster 2014-05-31 17:26:35 UTC
Created attachment 277625 [details]
An example code that triggers this bug

This code creates a class inside a namespace that contains Gtk as part of it, and also tries to create a Gtk.Label. The compiler returns an error because tries to find the Label class inside the local namespace, but when can't find it, doesn't search from the root.
Comment 3 GNOME Infrastructure Team 2018-05-22 14:26:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/306.