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

[Bug] Default initializer test shows globals-resolver deprecation #19046

Closed
mehulkar opened this issue Jul 17, 2020 · 3 comments · Fixed by #19087
Closed

[Bug] Default initializer test shows globals-resolver deprecation #19046

mehulkar opened this issue Jul 17, 2020 · 3 comments · Fixed by #19087
Labels

Comments

@mehulkar
Copy link
Contributor

mehulkar commented Jul 17, 2020

🐞 Describe the Bug

Initializer tests logs deprecation warning for usage of globals-resolver.

🔬 Minimal Reproduction

ember new
ember g initializer foo
ember test --filter="initializer"

😕 Actual Behavior

A deprecation warning is logged

🤔 Expected Behavior

No deprecation should be logged for code the user has not written

🌍 Environment

  • Ember: - 3.18 (pretty sure same behavior in later build too)

➕ Additional Context

The problem is that Application.create() is called with only the autoboot: false properties:

https://github.com/emberjs/ember.js/blob/v3.20.1/blueprints/initializer-test/qunit-rfc-232-files/__root__/__testType__/__path__/__name__-test.js#L15

Since a Resolver from ember-resolver is not passed, the DefaultResolver is used, which is the globals resolver.

Either the default should change, or the right Resolver can be imported and passed into the test application in the blueprint.

@rwjblue
Copy link
Member

rwjblue commented Jul 21, 2020

Ya, we should update the test that is generated to add import Resolver from 'ember-resolver' and pass that to the .extend invocation.

@rwjblue rwjblue added the Bug label Jul 21, 2020
@mehulkar
Copy link
Contributor Author

@rwjblue that might be a quick fix, but is it possible to change the default resolver? I think I'm getting this deprecation from a couple other places as well that I haven't traced yet. I don't know what else changing the default here might break: https://github.com/emberjs/ember.js/blob/v3.20.1/packages/@ember/engine/index.js#L455

@rwjblue
Copy link
Member

rwjblue commented Jul 21, 2020

@rwjblue that might be a quick fix, but is it possible to change the default resolver

No, changing the default would be a breaking change.

mehulkar pushed a commit to mehulkar/ember.js that referenced this issue Aug 7, 2020
The default resolver (the globals resolver is deprecated), so we
always need to pass this in.

Closes emberjs#19046
mehulkar pushed a commit to mehulkar/ember.js that referenced this issue Aug 7, 2020
The default resolver (the globals resolver is deprecated), so we
always need to pass this in.

Closes emberjs#19046
kategengler pushed a commit that referenced this issue Aug 17, 2020
The default resolver (the globals resolver is deprecated), so we
always need to pass this in.

Closes #19046

(cherry picked from commit fa35230)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants