Fixes for use in Ember 5.x but needs a little help (Issue #110)#111
Fixes for use in Ember 5.x but needs a little help (Issue #110)#111NullVoxPopuli merged 1 commit intoemberjs:masterfrom
Conversation
|
I have also been interested in getting a version of ember-classic-decorator that supports Ember 5. I looked into this PR a bit tonight and couldn't get much (if any) further than the PR author. I did notice there's a vendor file added by Embroider which updates the In the test suite for the Ember app I primarily work on, the two functions are run in the correct order allowing Mirage to boot, but I wasn't able to figure out the difference in code that would explain the difference in order, since both are essentially using the same standard tests/index.html, test-helper.js, etc. from the ember-cli blueprint. Ultimately I don't think this test issue should be a blocking concern for the main fixes proposed here, but regardless I hope someone on the core team can look at cutting a new Ember 5-compatible version soon. Not sure who to ping here other than perhaps @ef4? Or is this add-on being silently deprecated and we should try to remove it? Searching for updates on the Ember Discord I did see at least one core team member suggest not using |
|
Would love to see this go through. Just ran into this as well and we have a lot of classic components |
|
Same here. We can't upgrade to Ember 5 because we're using ember-simple-auth which is still using the old syntax. Updating |
|
Same here |
|
FWIW I've been able to work around this and upgrade to Ember 5 by specifying this PR branch directly in the e.g.: "overrides": {
"ember-classic-decorator": "lupestro/ember-classic-decorator#location-fix-ember53"
}It's not ideal – merging and cutting a new release would be better; the next best option might be for @lupestro to publish a fork with these changes – but it works for now. |
|
Hugest apologize, i don't know why i clicked the wrong button. But because ci hadn't ran, i reverted in #113 . Could you re-submit this pr so ci runs? Thank you! |
|
Just to let you all know that I re-opened this in #119 with most of the test-specific issues fixed (I think) If we can get this finished and over the line I think that would be great 👍 |
This PR includes a working fix for Ember 5.x, but the test suite needed a bunch of work. I bumped the
ember-dataandember-cli-mirageversions used by the dummy app to ones that will work all the way from 3.28 to canary, but no version ofember-datasupports 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-mirageinitialization.ember-cli-mirageuses@embroider/macros#isTestingto 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-mirageissue. 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?