Re: About gsettings aborting on unkown schemas

2011-05-31 Thread Milan Bouchet-Valat
Le lundi 30 mai 2011 à 20:17 -0400, Morten Welinder a écrit : Doing a g_return_val_if_fail is fine here. That will give the user a chance of saving his work. This is in contrast to g_error which is a sure way of eating data. There's no work of data here. Programs load GSettings on start, and

Re: About gsettings aborting on unkown schemas

2011-05-31 Thread Christian Dywan
Am Mon, 30 May 2011 21:13:16 -0400 schrieb Havoc Pennington: Hi, On Mon, May 30, 2011 at 8:37 PM, Shaun McCance sha...@gnome.org wrote: But I want to point out that my point was never that GLib should behave like a language with exceptions. Just that it should let bindings in those

Re: About gsettings aborting on unkown schemas

2011-05-31 Thread Matthias Clasen
On Mon, May 30, 2011 at 8:17 PM, Morten Welinder mort...@gnome.org wrote: The core principle that allows most functions to always succeed is that programming bugs are not thrown, they just terminate the program. Havoc, the data doesn't agree with that assertion. Let's look at numbers:

Re: About gsettings aborting on unkown schemas

2011-05-31 Thread Havoc Pennington
Hi, On Tue, May 31, 2011 at 5:47 AM, Christian Dywan christ...@lanedo.com wrote: This is a great argument. There was a mistake. It made you notice the API is inconsistent, so you suddenly insist that GLib can't be improved further without rewriting all the functions It didn't make me

Re: About gsettings aborting on unkown schemas

2011-05-31 Thread Owen Taylor
On Fri, 2011-05-27 at 11:57 -0400, Matthias Clasen wrote: On Fri, May 27, 2011 at 7:42 AM, ecyrbe ecy...@gmail.com wrote: I just filled this bug : https://bugzilla.gnome.org/show_bug.cgi?id=651225 Mathias closed it as wontfix, this is by design.. i'm told that it's not a bug it's a feature!

Re: About gsettings aborting on unkown schemas

2011-05-31 Thread Dan Winship
On 05/31/2011 03:12 PM, Owen Taylor wrote: So, let's add alternate API that allows for failure without going boom and blowing up the world, and let's figure out how to get that hooked up to languages with exceptions automatically. Yes, this is made harder by the fact that it's a constructor,

Re: About gsettings aborting on unkown schemas

2011-05-30 Thread Morten Welinder
The core principle that allows most functions to always succeed is that programming bugs are not thrown, they just terminate the program. Havoc, the data doesn't agree with that assertion. Let's look at numbers: glib, number of not-crashing on programmer errors: # find glib -type f -name

Re: About gsettings aborting on unkown schemas

2011-05-30 Thread Shaun McCance
On Fri, 2011-05-27 at 17:09 -0400, Havoc Pennington wrote: Hi, Man, how many times has this thread happened? At least fifty. On Fri, May 27, 2011 at 10:57 AM, Shaun McCance sha...@gnome.org wrote: try: load_some_extension() except: warn(This extension sucks. I'm disabling it

Re: About gsettings aborting on unkown schemas

2011-05-30 Thread Havoc Pennington
Hi, On Mon, May 30, 2011 at 8:17 PM, Morten Welinder mort...@gnome.org wrote: Doing a g_return_val_if_fail is fine here.  That will give the user a chance of saving his work.  This is in contrast to g_error which is a sure way of eating data. If that's the argument it's fine. I treat

Re: About gsettings aborting on unkown schemas

2011-05-28 Thread Milan Bouchet-Valat
Le vendredi 27 mai 2011 à 19:04 -0700, Hubert Figuiere a écrit : My code is *designed* to actually manage default value. Like UI has default that people whine about. This is just good programing practice. While I can perfectly conceive we might need a way to avoid crashing when a schema is

Re: About gsettings aborting on unkown schemas

2011-05-28 Thread ecyrbe
Here is a patch for this for those who want it. https://bugzilla.gnome.org/show_bug.cgi?id=651366 ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list

About gsettings aborting on unkown schemas

2011-05-27 Thread ecyrbe
I just filled this bug : https://bugzilla.gnome.org/show_bug.cgi?id=651225 Mathias closed it as wontfix, this is by design.. i'm told that it's not a bug it's a feature! So if my desktop is crashing it's a feature and nobody is willing to fix it?I really would like to have another answer than

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Emmanuele Bassi
On 2011-05-27 at 13:42, ecyrbe wrote: I just filled this bug : https://bugzilla.gnome.org/show_bug.cgi?id=651225 Mathias closed it as wontfix, this is by design.. i'm told that it's not a bug it's a feature! it's not a bug. the rationale is: schemas are an integral part of an application or a

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Emmanuele Bassi
On 2011-05-27 at 14:59, ecyrbe wrote: I just filled this bug : https://bugzilla.gnome.org/show_bug.cgi?id=651225 Mathias closed it as wontfix, this is by design.. i'm told that it's not a bug it's a feature! it's not a bug. of course it's a bug, you can't abort like that a

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Shaun McCance
On Fri, 2011-05-27 at 15:34 +0100, Emmanuele Bassi wrote: On 2011-05-27 at 14:59, ecyrbe wrote: and then what? abort the application? gracefully terminate with a warning on the console? No, you can gracefully show a popup to the user that something is broken and to the right

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Morten Welinder
you can say that all you want, but it's absolutely *not* a bug. Of course it is. With this bug, programs crash where they other- wise could limp on. It's like changing all g_return_if_fail calls into asserts -- after all, any time one of those hits it represents a bug somewhere. My log files

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Matthias Clasen
On Fri, May 27, 2011 at 7:42 AM, ecyrbe ecy...@gmail.com wrote: I just filled this bug : https://bugzilla.gnome.org/show_bug.cgi?id=651225 Mathias closed it as wontfix, this is by design.. i'm told that it's not a bug it's a feature! So if my desktop is crashing it's a feature and nobody is

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Emmanuele Bassi
On 2011-05-27 at 10:57, Shaun McCance wrote: On Fri, 2011-05-27 at 15:34 +0100, Emmanuele Bassi wrote: On 2011-05-27 at 14:59, ecyrbe wrote: and then what? abort the application? gracefully terminate with a warning on the console? No, you can gracefully show a popup to

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Hubert Figuiere
On 11-05-27 5:43 AM, Emmanuele Bassi wrote: On 2011-05-27 at 13:42, ecyrbe wrote: I just filled this bug : https://bugzilla.gnome.org/show_bug.cgi?id=651225 Mathias closed it as wontfix, this is by design.. i'm told that it's not a bug it's a feature! it's not a bug. It is a bug. the

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Emmanuele Bassi
On 2011-05-27 at 11:04, Morten Welinder wrote: you can say that all you want, but it's absolutely *not* a bug. Of course it is. With this bug, programs crash where they other- wise could limp on. potentially eating away data? without schema you don't have a default to fall back to for

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread ecyrbe
2011/5/27 Emmanuele Bassi eba...@gmail.com On 2011-05-27 at 11:04, Morten Welinder wrote: you can say that all you want, but it's absolutely *not* a bug. Of course it is. With this bug, programs crash where they other- wise could limp on. potentially eating away data? without schema

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Emmanuele Bassi
On 2011-05-27 at 08:51, Hubert Figuiere wrote: On 11-05-27 5:43 AM, Emmanuele Bassi wrote: On 2011-05-27 at 13:42, ecyrbe wrote: I just filled this bug : https://bugzilla.gnome.org/show_bug.cgi?id=651225 Mathias closed it as wontfix, this is by design.. i'm told that it's not a bug

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Emmanuele Bassi
On 2011-05-27 at 18:17, ecyrbe wrote: Of course it is. With this bug, programs crash where they other- wise could limp on. potentially eating away data? without schema you don't have a default to fall back to for application preferences and for state. it might end up deleting

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Shaun McCance
On Fri, 2011-05-27 at 17:02 +0100, Emmanuele Bassi wrote: On 2011-05-27 at 10:57, Shaun McCance wrote: On Fri, 2011-05-27 at 15:34 +0100, Emmanuele Bassi wrote: On 2011-05-27 at 14:59, ecyrbe wrote: and then what? abort the application? gracefully terminate with a warning on the

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Milan Bouchet-Valat
Le vendredi 27 mai 2011 à 08:51 -0700, Hubert Figuiere a écrit : First, if the UI file is missing the application does not abort. There is an error but it can be handled by the application, and eventually recovered gracefuly. I deleted all the UI files and my app didn't crash. Sure it was not

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread ecyrbe
2011/5/27 Milan Bouchet-Valat nalimi...@club.fr Le vendredi 27 mai 2011 à 08:51 -0700, Hubert Figuiere a écrit : First, if the UI file is missing the application does not abort. There is an error but it can be handled by the application, and eventually recovered gracefuly. I deleted all

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Nacho
IMHO it is a problem in gnome shell, it should provide some api to create the settings for the plugins and in this api check that the settings really exists and do not enable the plugin in that case. But as said in some comment this is under development to provide dynamic place for setting on

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Havoc Pennington
Hi, Man, how many times has this thread happened? At least fifty. On Fri, May 27, 2011 at 10:57 AM, Shaun McCance sha...@gnome.org wrote: try:    load_some_extension() except:    warn(This extension sucks. I'm disabling it and moving on.) Of course, GLib is C. We don't have exceptions. We

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Hubert Figuiere
On 11-05-27 9:46 AM, Milan Bouchet-Valat wrote: Le vendredi 27 mai 2011 à 08:51 -0700, Hubert Figuiere a écrit : First, if the UI file is missing the application does not abort. There is an error but it can be handled by the application, and eventually recovered gracefuly. I deleted all the UI

Re: About gsettings aborting on unkown schemas

2011-05-27 Thread Krzysztof Kosiński
2011/5/27 Havoc Pennington h...@pobox.com: Config schemas that contain type checking and default values are part of the program; the program is either incorrect, or redundant in a way likely to create bugs, without the schemas. If schemas were just docs or something, it would be a different