-
-
Notifications
You must be signed in to change notification settings - Fork 261
Resolve deprecations from ember barrel file #1537
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
Changes from all commits
a6c2f70
9054005
bd8fa96
cc759bf
1acd383
868c2e8
d97a41b
76cd35f
c0b92c4
910935c
1b6ebbc
3944c69
cb876e1
8231ef8
1f3ea44
5b784f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,18 +2,15 @@ import type { Resolver } from '@ember/owner'; | |
| import ApplicationInstance from '@ember/application/instance'; | ||
| import Application from '@ember/application'; | ||
| import EmberObject from '@ember/object'; | ||
|
|
||
| import Ember from 'ember'; | ||
| import { Registry } from '@ember/-internals/container'; | ||
| import { ComponentLookup } from '@ember/-internals/views'; | ||
|
|
||
| import type { FullName } from '@ember/owner'; | ||
|
|
||
| // These shenanigans work around the fact that the import locations are not | ||
| // public API and are not stable, so we jump through hoops to get the right | ||
| // types and values to use. | ||
| import { | ||
| ContainerProxyMixin, | ||
| RegistryProxyMixin, | ||
| } from './-owner-mixin-imports.ts'; | ||
| } from '@ember/-internals/runtime'; | ||
|
|
||
| /** | ||
| * Adds methods that are normally only on registry to the container. This is largely to support the legacy APIs | ||
|
|
@@ -102,10 +99,9 @@ export default function buildRegistry(resolver: Resolver) { | |
| const fallbackRegistry = Application.buildRegistry(namespace); | ||
| // TODO: only do this on Ember < 3.13 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this comment relevant? If so, do we even need to be supporting Ember < 3.13 here?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't, but I'd argue cleanup for legacy stuff should be in a different PR (which I can submit next! as there are a number of other cleanup opportunities, I think) |
||
| // @ts-ignore: this is private API. | ||
| fallbackRegistry.register('component-lookup:main', Ember.ComponentLookup); | ||
| fallbackRegistry.register('component-lookup:main', ComponentLookup); | ||
|
|
||
| // @ts-ignore: this is private API. | ||
| const registry = new Ember.Registry({ | ||
| const registry = new Registry({ | ||
| fallback: fallbackRegistry, | ||
| }); | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we specified these with the barrel deprecation RFC, but I wonder if there is anything in ember-source testing to make sure we don't break such import paths?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they're all private API, so I think it's totally fair for ember to break them if it wishes.
@ember/test-helpers should not be using private APIs haha
(we can explore migrate off of them in a separate PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They may be private but if we don't do that follow up PR all the pain will be ours.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aye, I'm doing this now 🎉