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

Addon#setupPreprocessorRegistry should be invoked after addon.app is set. #7059

Merged
merged 2 commits into from May 26, 2017

Conversation

stefanpenner
Copy link
Contributor

@stefanpenner stefanpenner commented May 20, 2017

  • get feedback re: if this is reasonable (cc @rwjblue)
  • tests (more comprehensive life-cycle tests)

@stefanpenner
Copy link
Contributor Author

stefanpenner commented May 21, 2017

The more I look at this, the more reasonable it seems. Although im not 100% sure if pre-existing things depend on this ordering... its possible.

@stefanpenner
Copy link
Contributor Author

stefanpenner commented May 21, 2017

Ya, so this ordering is depended on -> https://github.com/ember-cli/ember-cli-htmlbars-inline-precompile/blob/master/index.js#L71

But I believe we can at-least make app available before we call setupRegistry rather then after, which should ensure addon.app is available for setupPreprocessorRegistry (issue #6362)

@Turbo87
Copy link
Member

Turbo87 commented May 22, 2017

@stefanpenner I'm not entirely following yet. what advantage does this create?

@stefanpenner
Copy link
Contributor Author

@Turbo87 I'll write a test, that makes this more obvious but TL;DR addon.setupPreprocessorRegistry is invoked before addon.app is set, this means if you need access to addon.app.config for your registry setup your are out of luck today.

@stefanpenner stefanpenner force-pushed the include-registry-interopt branch 3 times, most recently from 0c35ec3 to d68e239 Compare May 23, 2017 15:40
@stefanpenner
Copy link
Contributor Author

fixed linting error.

@stefanpenner stefanpenner changed the title Only setup an add-ons registry after it has been included Addon#setupPreprocessorRegistry should be invoked after addon.app is set. May 23, 2017
@stefanpenner
Copy link
Contributor Author

will change this to bugfix beta.

@rwjblue rwjblue changed the base branch from master to beta May 26, 2017 12:46
@rwjblue rwjblue force-pushed the include-registry-interopt branch from d68e239 to 1a6802e Compare May 26, 2017 12:48
@rwjblue
Copy link
Member

rwjblue commented May 26, 2017

Updated to point to beta, and rebased.

@Turbo87
Copy link
Member

Turbo87 commented May 26, 2017

thanks to mainmatter/ember-test-selectors#116 I finally understand what this PR is doing... LGTM 👍

@rwjblue
Copy link
Member

rwjblue commented May 26, 2017

Merging manually (changing targets makes @homu emo).

@Turbo87
Copy link
Member

Turbo87 commented Apr 6, 2019

@stefanpenner it looks like the implementation here is somewhat flawed. for app builds this seems to work, but when building addons setupPreprocessorRegistry() is apparently called before the EmberApp/Addon class is even instantiated.

I'm trying to fix mainmatter/ember-test-selectors#345 but it seems almost impossible at this point. If you or @rwjblue have 30min to pair with me on this next week that would be awesome!

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.

None yet

3 participants