ember-cli / ember-cli-deprecation-workflow

MIT License
165 stars 43 forks source link

Registering a deprecation handler after workflow doesn't work #113

Closed mixonic closed 3 years ago

mixonic commented 3 years ago

Filing for @runspired

after digging in it seems the issue with not being able to register a handler was that ember-cli-deprecation-workflow was (IS still until https://github.com/mixonic/ember-cli-deprecation-workflow/pull/107/files lands) using ember-debug-handlers-polyfill which appears to clobber the deprecation handler in newer versions of ember (at least as of a year ago), potentially due to issues around ember global vs ember modules.

At https://github.com/ember-polyfills/ember-debug-handlers-polyfill/blob/master/vendor/ember-debug-handlers-polyfill/debug.js the implementation of the registerDeprecationHandler system is indeed squashed on the Ember global, but should only squashed if a prior implementation is not found https://github.com/ember-polyfills/ember-debug-handlers-polyfill/blob/master/vendor/ember-debug-handlers-polyfill/debug.js#L135

I haven't confirmed this, or what versions of Ember it impacts. Maybe @runspired has more.

mixonic commented 3 years ago

@runspired this should be resolved on master via removal of the polyfill, but please confirm. I didn't attempt to figure out my own reproduction.