-
Notifications
You must be signed in to change notification settings - Fork 43
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
Doesn't work when enabling Embroider's new staticEmberSource
option
#156
Comments
At the moment, we ditched // app/app.js
import { importSync, isDevelopingApp, macroCondition } from '@embroider/macros';
if (macroCondition(isDevelopingApp())) {
importSync('module-prefix/deprecation-workflow');
} // app/deprecation-workflow.js
import { registerDeprecationHandler } from '@ember/debug';
import config from 'module-prefix/config/environment';
const SHOULD_THROW = config.environment !== 'production';
const SILENCED_DEPRECATIONS = [
// Add ids of deprecations you temporarily want to silence here.
];
registerDeprecationHandler((message, options, next) => {
if (SILENCED_DEPRECATIONS.includes(options.id)) {
return;
} else if (SHOULD_THROW) {
throw new Error(message);
}
next(message, options);
}); I think this is a direction |
THANK YOU @bertdeblock, I was exploring something with an initializer, but this is a way more complete solution. |
should we make this default in ember and not bother with another dep? it's so few lines |
That makes a lot of sense to me @NullVoxPopuli. I can't imagine using an ember app without this functionality. |
* Do not allow deprecations to exist * We don't need deprecation-workflow (the package). See: ember-cli/ember-cli-deprecation-workflow#156 * Fix a deprecation * Fix deprecations
It would be great to get a release of ember-cli-deprecation-workflow that supports this, as a short-term bridge to @NullVoxPopuli's suggestion of supporting it more formally in Ember. |
The inline if on this LOC evaluates to false, after which an error is thrown, because the
Ember
global is no longer available.The text was updated successfully, but these errors were encountered: