brackets-archive / bracketsIssues

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

[CLOSED] Print deprecation warnings for extensions using $() on EventDispatchers #9213

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by peterflynn Monday Jan 19, 2015 at 16:57 GMT Originally opened as https://github.com/adobe/brackets/pull/10415


Print deprecation warnings for extensions that are still using $() wrapper on Brackets EventDispatcher objects. The shim still works, so extensions have more time to migrate.

Many extensions have yet to migrate, so this creates quite a bit of console spam. That makes me a little hesitant to land it late-ish in the 1.2 cycle -- maybe it would be better to land early in 1.3? Open to either option, but I'm curious to hear others' opinions... It now only prints one warning per caller, so the spam seems manageable -- I'd like to land this for 1.2 if it seems safe enough to others.


peterflynn included the following code: https://github.com/adobe/brackets/pull/10415/commits

core-ai-bot commented 3 years ago

Comment by MarcelGerber Monday Jan 19, 2015 at 18:08 GMT


You may be able to introduce a new method in DeprecationWarning to only log a warning once per caller line.

core-ai-bot commented 3 years ago

Comment by peterflynn Monday Feb 09, 2015 at 07:56 GMT


@MarcelGerber That was a good call! DeprecationWarning has such a method already, but it's not reachable from main.js since it's so early in the startup sequence -- but since we only need this shim for extension code now, I can move it into brackets.js where it's easy to call DeprecationWarning. Changes pushed!

core-ai-bot commented 3 years ago

Comment by nethip Tuesday Feb 10, 2015 at 12:51 GMT


Merged to master.