Skip to content
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

[CLEANUP] remove manually annoted legacy code #1520

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chancancode
Copy link
Member

These are slightly riskier in that you'd have to take the comment author's word for it, as the proposed code was never execrised or tested in the real world (unlike in #20798, where, if there were no bugs in the branchgin, we should have been running the correct branch all along and for a while now).

But I manually audited these spots and to my knowledge they seemed safe.

These are slightly riskier in that you'd have to take the comment
author's word for it, as the proposed code was never execrised or
tested in the real world (unlike in #20798, where, if there were
no bugs in the branchgin, we should have been running the correct
branch all along and for a while now).

But I manually audited these spots and to my knowledge they seemed
safe.
@@ -100,9 +100,6 @@ export default function buildRegistry(resolver: Resolver) {

// @ts-ignore: this is private API.
const fallbackRegistry = Application.buildRegistry(namespace);
// TODO: only do this on Ember < 3.13
// @ts-ignore: this is private API.
fallbackRegistry.register('component-lookup:main', Ember.ComponentLookup);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hasn't done anything for a long time now, and in any case this would be re-registering the same thing that was already there.

//
// import { registerWaiter } from '@ember/test';
Ember.Test.registerWaiter(this, this.isReady);
registerWaiter(this, this.isReady);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other places in the codebase that already uses this pattern

@@ -113,8 +106,7 @@ const TestComponent5 = Component.extend({

willDestroy() {
this._super.apply(this, arguments);
// must be called with `Ember.Test` as context for Ember < 2.8
Ember.Test.unregisterWaiter(this, this.isReady);
unregisterWaiter(this, this.isReady);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other places in the codebase that already uses this pattern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant