maildev@lists.thunderbird.net

Thunderbird email developers

View all threads

Re: [Maildev] Fwd: Re: Proposal to remove some preferences override support

A
Aceman
Thu, Nov 2, 2017 2:48 PM

Od: Ben Bucksch ben.bucksch@beonex.com
Komu: maildev@lists.thunderbird.net
Dátum: 02.11.2017 15:22
Predmet: Re: [Maildev] Fwd: Re: Proposal to remove some preferences override

Jörg Knobloch wrote on 02.11.17 15:15:

On 02/11/2017 14:38, Ben Bucksch wrote:

That will cause massive breakage.

Will it? It affects add-ons that define preferences that way. Looking
at the add-ons I wrote, there's one affected which can be fixed by
creating the preference on the fly.

It will break most extensions that I know.

The extension often queries preferences, and presumes that the
preference is there. If neither a user pref is set, not a default pref,
nor a hardcoded default, then the pref UI throws an exception and the
extension is broken. Hardcoding is bad coding practice. The developer
relies on the preference being there, so the extension was never tested
with the default prefs missing. Errors can happen at any place in the
extension code, anywhere prefs are queried. So, you'd need to exercize
all code paths, or make a static code inspection, to verify that the
extension doesn't break.

+1

For illustration purposes only, try removing thunderbird.js and all
other default prefs from Thunderbird, and try running it. Then try
fixing all breakage.

Also, about:config will be broken, because users want to see the
preferences that are available (even if they didn't change them yet).

Exactly. That's what I ask if the 'new' way keeps these old features.

______________________________________________________________ > Od: Ben Bucksch <ben.bucksch@beonex.com> > Komu: maildev@lists.thunderbird.net > Dátum: 02.11.2017 15:22 > Predmet: Re: [Maildev] Fwd: Re: Proposal to remove some preferences override > >Jörg Knobloch wrote on 02.11.17 15:15: >> On 02/11/2017 14:38, Ben Bucksch wrote: >>> That will cause massive breakage. >> >> Will it? It affects add-ons that define preferences that way. Looking >> at the add-ons I wrote, there's one affected which can be fixed by >> creating the preference on the fly. >> > >It will break most extensions that I know. > >The extension often queries preferences, and presumes that the >preference is there. If neither a user pref is set, not a default pref, >nor a hardcoded default, then the pref UI throws an exception and the >extension is broken. Hardcoding is bad coding practice. The developer >relies on the preference being there, so the extension was never tested >with the default prefs missing. Errors can happen at any place in the >extension code, anywhere prefs are queried. So, you'd need to exercize >all code paths, or make a static code inspection, to verify that the >extension doesn't break. +1 >For illustration purposes only, try removing thunderbird.js and all >other default prefs from Thunderbird, and try running it. Then try >fixing all breakage. > >Also, about:config will be broken, because users want to *see* the >preferences that are available (even if they didn't change them yet). Exactly. That's what I ask if the 'new' way keeps these old features.