-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Addon discovery and isolation #3166
Conversation
This is looking very good. |
…istry instance. Acceptance test demonstrates an addon that preprocesses it’s parent’s JS, but not it’s parent’s parent’s JS.
621b5e9
to
97587fa
Compare
I believe this is now feature complete. Still needs tests and docs, as I've added to the checklist, but it would be a great time to provide any feedback on the implementation. |
RAD. Will test tomorrow. I've got a bunch of projects and addons working around this that I can test against. |
@jayphelps note that this is a breaking change. Addons may need to be updated to implement |
…istry instance. Acceptance test demonstrates an addon that preprocesses it’s parent’s JS, but not it’s parent’s parent’s JS.
1254b1d
to
5270941
Compare
… into addon-discovery
b154431
to
a646e8b
Compare
Removed WIP label. @ember-cli/owners - Speak now or forever hold your peace... |
@lukemelia big OS ❤️ from me to you, Sir. |
Awesome work @lukemelia! 👍 |
This was a team effort. @rwjblue provided great guidance and took it over the finish line. Also, props to @chrislopresto for helping me with some testing and thinking on this, and to @gshackles at @ololabs for funding the early work on this. Glad to see it landing! |
@lukemelia this is intensely awesome, a very important iteration on the whole addon concept.
|
Conflicts: blueprints/app/files/bower.json
Added unit tests for |
@joostdevries I could go either way on the separation of AddonDiscovery and AddonsFactory. Conceptually, it seems to me that discovering dependent addons is a separate thing from instantiating a set of addons in DAG-powered order. Regarding registering addonPackages on the Project... yes I think we ultimately should have the encapsulation be complete. I was trying to take as small a step here as I could with respect to number of APIs we were breaking. |
This looks awesome. I am going to set some time aside tonight to thoroughly review this. |
@stefanpenner - I'd like to land this and release 0.2.0-beta.1 soon (once Travis passes), that way folks have some time to provide feedback on the beta (and allows others to help out easier since it wouldn't be blocked in this PR any longer). |
@lukemelia I'm with you on that. Again, this looks amazing. |
@cibernox - Not sure, you will still need to review |
I thought that core stuff like |
@cibernox - Nope, that is not being done in this PR. Those addons will continue living in your apps |
Undestood |
Huge thanks @lukemelia, @rwjblue, and everyone else involved! 👏 |
The goal of this PR is to address #2714 by moving to a model where addons are more isolated, and addons that have addons don't pollute the project with the dependent addons.
Feedback welcome.
setupPreprocessorRegistry(type, registry)
registry
tomodels/
setupPreprocessorRegistry
hooksetupPreprocessorRegistry
hook