Skip to content

Commit

Permalink
[BUGFIX beta] Remove Namespace processing
Browse files Browse the repository at this point in the history
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 e1323e2)
  • Loading branch information
Chris Garrett authored and kategengler committed May 3, 2021
1 parent ecc9ee9 commit 2d87496
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions packages/@ember/application/lib/application.js
Expand Up @@ -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';
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -887,8 +878,6 @@ const Application = Engine.extend({
willDestroy() {
this._super(...arguments);

setNamespaceSearchDisabled(false);

if (_loaded.application === this) {
_loaded.application = undefined;
}
Expand Down

0 comments on commit 2d87496

Please sign in to comment.