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 710583 - g_dbus_connection_call_with_unix_fd_list_finish and g_dbus_proxy_call_with_unix_fd_list_finish don't follow standard async method argument ordering
g_dbus_connection_call_with_unix_fd_list_finish and g_dbus_proxy_call_with_un...
Status: RESOLVED WONTFIX
Product: glib
Classification: Platform
Component: gdbus
unspecified
Other All
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-10-21 20:18 UTC by Robert Ancell
Modified: 2013-10-22 20:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Robert Ancell 2013-10-21 20:18:52 UTC
g_dbus_connection_call_with_unix_fd_list_finish and g_dbus_proxy_call_with_unix_fd_list_finish don't follow the standard async method argument ordering which is (object, result, return values, error).

i.e.

GVariant *g_dbus_connection_call_with_unix_fd_list_finish (
  GDBusConnection    *connection,
  GUnixFDList       **out_fd_list,
  GAsyncResult       *res,
  GError            **error);

should be:

GVariant *g_dbus_connection_call_with_unix_fd_list_finish (
  GDBusConnection    *connection,
  GAsyncResult       *res,
  GUnixFDList       **out_fd_list,
  GError            **error);

This causes the Vala bindings for GLib to incorrectly call g_dbus_connection_call_with_unix_fd_list_finish as it assumes the second argument is the GAsyncResult. I don't know if other bindings have the same problem.

I'm not sure if there's an appropriate solution for this without creating new method names, but I'm looking for a solution in GLib and/or Vala.
Comment 1 Dan Winship 2013-10-21 20:22:44 UTC
vala is clearly already looking at the introspection data, since it knows that the out_fd_list arg is there at all, so it ought to just be paying a bit more attention...

Having inconsistent style is bad, but I'm not sure it's so bad that we'd actually want to deprecate and redo the function...
Comment 2 Robert Ancell 2013-10-21 20:24:27 UTC
Vala bug is bug 688907
Comment 3 David Zeuthen (not reading bugmail) 2013-10-21 20:24:40 UTC
I don't think there are any "standard async method argument ordering". I think the problem is that Vala is making incorrect assumptions - all it needs to know should be in the gir/typelib; if it isn't, the Vala people needs to work with the GI people to expand the format.
Comment 4 Robert Ancell 2013-10-21 20:26:14 UTC
Yeah, agreed about the severity. I thought it best to raise a bug so at least it can be found if others come across it and we have a decision on it.
Comment 5 Allison Karlitskaya (desrt) 2013-10-22 14:44:08 UTC
for what it's worth, I winced when reading the API at the top of this bug.  This is definitely a violation of my expectations, but that said, I don't think we can reasonably fix it at this point.
Comment 6 Matthias Clasen 2013-10-22 20:41:24 UTC
so, wontfix ?