From 2d874963a1ca00244192b1911493bed1e42e232b Mon Sep 17 00:00:00 2001 From: Chris Garrett Date: Tue, 27 Apr 2021 11:02:55 -0700 Subject: [PATCH] [BUGFIX beta] Remove Namespace processing Ember no longer uses Namespaces in the `toString` on classes, so there's no reason to eagerly process namespaces on application boot. This is currently triggering the deprecation message in new Ember applications on Beta, so this removes it to prevent that. (cherry picked from commit e1323e283b0212ee037437722b4ebf98c67f8587) --- packages/@ember/application/lib/application.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/@ember/application/lib/application.js b/packages/@ember/application/lib/application.js index 978a55d48d3..1a65185c961 100644 --- a/packages/@ember/application/lib/application.js +++ b/packages/@ember/application/lib/application.js @@ -5,14 +5,10 @@ import { dictionary } from '@ember/-internals/utils'; import { ENV } from '@ember/-internals/environment'; import { hasDOM } from '@ember/-internals/browser-environment'; -import { assert, isTesting } from '@ember/debug'; +import { assert } from '@ember/debug'; import { DEBUG } from '@glimmer/env'; import { join, once, run, schedule } from '@ember/runloop'; -import { - libraries, - processAllNamespaces, - setNamespaceSearchDisabled, -} from '@ember/-internals/metal'; +import { libraries } from '@ember/-internals/metal'; import { _loaded, runLoadHooks } from './lazy_load'; import { RSVP } from '@ember/-internals/runtime'; import { EventDispatcher, jQuery, jQueryDisabled } from '@ember/-internals/views'; @@ -828,11 +824,6 @@ const Application = Engine.extend({ try { // TODO: Is this still needed for _globalsMode = false? - if (!isTesting()) { - // Eagerly name all classes that are already loaded - processAllNamespaces(); - setNamespaceSearchDisabled(true); - } // See documentation on `_autoboot()` for details if (this.autoboot) { @@ -887,8 +878,6 @@ const Application = Engine.extend({ willDestroy() { this._super(...arguments); - setNamespaceSearchDisabled(false); - if (_loaded.application === this) { _loaded.application = undefined; }