-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Ember.emberDeprecate
is not a function
#540
Conversation
The internal `deprecate` wrapper imports Ember's deprecation utility from a different location than the documented one. `deprecate` documentation: https://api.emberjs.com/ember/3.24/functions/@ember%2Fdebug/deprecate
For some reason, the Ember Babel plugin isn’t working when we re-name the `deprecate` function while importing; it results in the code being converted into `Ember.emberDeprecate` Rather than `Ember.deprecate` And that function is, understandably, not defined. I thought the issue might be the dated version of `ember-cli-babel` but updating that doesn’t seem to actually solve the problem.
75c0131
to
b577bf2
Compare
deprecate
from documented moduleEmber.emberDeprecate
is not a function
For some reason, when the At first I thought that this was all caused by importing from the wrong module (my first commit) but that didn't actually fix the problem. I then figured this would be a bug in Just avoiding the alias while importing does fix the problem so... I guess we'll do that? 🤷♂️ |
Interestingly, it seems like the I wonder if that is related to the fact that the alias on importing seems broken. |
Oh hey, here's the actual bug ember-cli/babel-plugin-debug-macros#48 Also called out on the |
Hey, thanks for the fix and info! I'm going to merge and publish it, once CI passes. |
Recently I had to do a similar change to the v2-beta branch 2d7ea1b, but I didn't realize we do use an invalid import path. Will fix it there as well. |
alright, travis build has failed for ember-beta scenario due to a monstrous amount of deprecations, and maximum log length 😋 |
published as 1.17.7. Thanks! |
The internal
deprecate
wrapper imports Ember's deprecation utility from a different location than the documented one.When running this addon against the latest version of Ember, a runtime error occurs where Ember's deprecation function is not defined.
deprecate
documentation: https://api.emberjs.com/ember/3.24/functions/@ember%2Fdebug/deprecate