Re: About gsettings aborting on unkown schemas



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 rationale is: schemas are an integral part of an application or a
> library exposing settings. it's like the .ui file for applications
> creating their user interface through GtkBuilder. there is no amount of
> magic in the world that can save you from a missing .ui file. without
> the schema, the settings system cannot identify default values, key
> names or *anything* else about the settings.

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 very functional but I actually had the opportunity to
show a proper error message to the user. Not a crash.

Second the actual requirement of the schemas is part of the problem,
even though that's not the original complain. Even more so that it does
not seems to be possible to load a schema at runtime or to have it in a
specific prefix... unlike in gconf. GSettings is a huge regression in
gconf: read my words. It is WORSE.

Third, passing a NULL widget to gtk_widget_(), or the wrong type does
not cause an abort. And this is likely a programmer error with barely no
external side effect, unlike the gsettings schemas.

> 
>> 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 this one.
> 
> if your desktop is crashing then it means that some part of it is
> relying on a file that is not there. try randomly removing a shared
> library from your system, and you'll obtain the same behaviour.

Wow. So basically you are saying that instead of having a SOLID
foundation we should have a fragile system with so many component?

Weren't you complaining about the lack of MacOS-style bundles you seem
to be pretty inconsistent: one of the thing that MacOS-style bundles
permit is it actually install an application by copying ONE SINGLE item.
But with gsettings this is just impossible. The dicatorship of
distributions like you call it is right here[1].

[ screenshot of the tweet by use @ebassi ]

> 
>> Can't we make gsettings return a null parameter?
> 
> and then what? abort the application? gracefully terminate with a
> warning on the console?

The application should gracefuly deal with it, but isn't currently left
with a chance to do so. I mean come in if it is a bool saying "reload my
last document" then it is false.

Hub

[1] https://twitter.com/ebassi/status/72990226313777152


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]