brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] PreferencesManager.convertPreferences() does not throw warning #9210

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by le717 Monday Jan 19, 2015 at 01:10 GMT Originally opened as https://github.com/adobe/brackets/issues/10412


This was brought up by an extension author I was talking to some time back, but I forgot to report this.

It's known the old preferences system is deprecated and will be removed (I already have a PR up to remove it). The PreferencesManager.convertPreferences() method, used to convert the preferences to the new system, will obviously be removed at the same time. However, as the author mentioned to me, the method throws no error saying it will be removed in the future. In fact, it works silently, and the deprecation warnings only fire if the old get/set methods are directly accessed, not when preferences are converted.

The author thought convertPreferences() should be throwing a deprecation warning to alert that it too will soon go away, and with a select few extensions still using the old/conversion system, I think it may be a good idea to quickly add one so it will go off in the v1.2 release, which will could allow us to remove the old system as early as 1.3 or 1.4.

(Side note: If you are reading this and are the extension author I spoke to, please speak up. I have completely forgot who I spoke to :cry:).

core-ai-bot commented 3 years ago

Comment by MarcelGerber Monday Jan 19, 2015 at 15:40 GMT


It was@gruehle over at https://github.com/gruehle/MarkdownPreview/commit/8450de4f1d34ea781ecdb0d83459aba1672ec3f0#commitcomment-9051689.

But I just did a quick search for convertPreferences in the whole registry and there wasn't a single result, so I suppose we can savely remove convertPreferences in 1.2 already.

core-ai-bot commented 3 years ago

Comment by peterflynn Monday Jan 19, 2015 at 15:57 GMT


If there are still authors using the old preferences API, then convertPreferences() is important to keep for a while so they have a clear path for migrating to the new API when the old one is removed.

core-ai-bot commented 3 years ago

Comment by MarcelGerber Monday Jan 19, 2015 at 16:03 GMT


Yeah, there are still multiple such extensions around, but unfortunately, most extension authors simply ignore the deprecation warnings (see https://github.com/adobe/brackets/issues/8751#issuecomment-61132680) posted to their extensions repo.

core-ai-bot commented 3 years ago

Comment by le717 Wednesday Jan 21, 2015 at 00:35 GMT


If there are still authors using the old preferences API, then convertPreferences() is important to keep for a while so they have a clear path for migrating to the new API when the old one is removed.

Yeah, there are still multiple such extensions around, but unfortunately, most extension authors simply ignore the deprecation warnings... posted to their extensions repo.

This is why I'm thinking a deprecation warning added should be added even late in v1.2. Maybe the warnings will be enough to trigger authors to remove the call and reliance on the old preferences system. Authors have had a really long time to transition. This would be "the last chance" before removal. It's not as if they were not warned.

core-ai-bot commented 3 years ago

Comment by le717 Sunday Feb 15, 2015 at 00:59 GMT


Now that we've reached v1.3, could we soon reach a decision on either issuing a "last call" warning or going ahead and removing the old pref system?

core-ai-bot commented 3 years ago

Comment by nethip Wednesday May 27, 2015 at 09:21 GMT


@le717 Let us target adding a deprecation warning for 1.4. Will you be able to put up a PR for that?

core-ai-bot commented 3 years ago

Comment by le717 Wednesday May 27, 2015 at 13:53 GMT


@nethip Certainly.