Fixes for use in Ember 5.x but needs a little help (Issue #110) #111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes a working fix for Ember 5.x, but the test suite needed a bunch of work. I bumped the
ember-data
andember-cli-mirage
versions used by the dummy app to ones that will work all the way from 3.28 to canary, but no version ofember-data
supports both Ember 3.24 and Ember 5.x.In this drop, the only application test fails, but all other tests pass. The root issue is deep in
ember-cli-mirage
initialization.ember-cli-mirage
uses@embroider/macros#isTesting
to determine whether we are in tests. If we aren't in tests, the app initializer creates the mirage server. If we are in tests, it doesn't and letssetupMirage()
do the work. Unfortunately, when we are running tests, theisTesting()
embroider macro is returning false during app initialization. So the code tries to start the mirage server and blows up trying to read theapplication.__container__
, which doesn't exist yet. When running the app (perhaps because autoboot is on?) theapplication.__container__
is there when it hits that initializer.So here's where I need guidance:
ember-cli-mirage
issue. It seems a shame to drop the only acceptance test in the suite in order to get a fix for a real problem we are encountering out the door. Is that the right thing to do?