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 665375 - avahi: Error handling is part of -client and not -gobject.
avahi: Error handling is part of -client and not -gobject.
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Bindings
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
: 667814 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-12-02 09:46 UTC by Fabian Deutsch
Modified: 2018-05-22 14:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Pulls the errordomain Error and strerror into -common. (4.09 KB, patch)
2011-12-02 09:46 UTC, Fabian Deutsch
none Details | Review
add deprection attributes (2.91 KB, patch)
2012-01-12 20:52 UTC, Fabian Deutsch
none Details | Review

Description Fabian Deutsch 2011-12-02 09:46:52 UTC
Created attachment 202578 [details] [review]
Pulls the errordomain Error and strerror into -common.

The avahi arrordomain Error was left in -gobject but needs to reside in -client, as functions within -client throw such errors.
The error was introduced because errordomain Error was pointing to the wrong header files. It wasn't obvious from looking at the vapi that those were defined in avahi-common (corresponding to avahi-client.vapi).
Comment 1 Fabian Deutsch 2011-12-02 09:47:12 UTC
...
and fixes the referenced header files.
Comment 2 Fabian Deutsch 2011-12-09 11:28:11 UTC
Is any additional info needed?
Comment 3 Jürg Billeter 2011-12-09 12:34:59 UTC
From what I can tell, avahi-client only defines the enum but not the errordomain. The errordomain still needs avahi-gobject (GA_ERROR). I suspect that this patch would break code that uses Avahi.Error in throw and catch clauses as ga-error.h will no longer be included and the prefix will be wrong for the errordomain quark.
Comment 4 Fabian Deutsch 2011-12-09 12:47:27 UTC
(In reply to comment #3)
> From what I can tell, avahi-client only defines the enum but not the
> errordomain. The errordomain still needs avahi-gobject (GA_ERROR). I suspect
> that this patch would break code that uses Avahi.Error in throw and catch
> clauses as ga-error.h will no longer be included and the prefix will be wrong
> for the errordomain quark.

Thanks for this feedback. 
So the thing to allow a split between -gobject and -client is to remove all "throw Error" from -client and use the return value instead?
This way I could pull the errordomain again back into -gobject, and the only way to handle errors in -client would be to look at the return value.
Comment 5 Fabian Deutsch 2011-12-20 09:08:33 UTC
The scheme above actually doesn't work, as some methods are members (e.g. Domain.service_name_split), and those can't be easily moved into gobject.

Therefore the only solution is see is breaking b.c. and removing the wrappers which throw errors.
Namely StringList.parse, Domain.service_name_join and Domain.service_name_split .
Or am I missing something?
Comment 6 Fabian Deutsch 2012-01-12 20:52:21 UTC
Created attachment 205134 [details] [review]
add deprection attributes
Comment 7 Fabian Deutsch 2012-01-12 20:54:42 UTC
The patch above deprectaes the wrappers in avahi-client which throw errors and thus depend on gobject (gerror). This is not accetable for the non-gobject lib avahi-client.

The gerror will be removed at some point in the future, before a 0.16 release.
Comment 8 Evan Nemerson 2012-01-14 07:38:29 UTC
*** Bug 667814 has been marked as a duplicate of this bug. ***
Comment 9 Evan Nemerson 2012-01-14 07:40:35 UTC
commit 307da0c2e0f7ed4320ba7eec345949edd0e36fbf
Author: Fabian Deutsch <fabian.deutsch@gmx.de>
Date:   Fri Jan 13 11:26:48 2012 -0800

    avahi-client: deprecated wrapper methods which throw errors
    
    First step towards fixing 665375.
Comment 10 GNOME Infrastructure Team 2018-05-22 14:15:56 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/258.