-
Notifications
You must be signed in to change notification settings - Fork 286
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
fix loading ember-inspector after reload #2051
Conversation
@patricklx we have 4 PRs now around deferring loading. Which of these do we actually want to go with? Do any of them fix the issue for sure? |
so, i found multiple issues with some race conditions during reloading. this just fixes one symptom. So the combination of the prs fixes the problems i have and also work on other sites i tested. |
It feels like there should be one thing to wait for and fix it all though, but perhaps not? |
that would be the best for sure. but im not able to find something like that. using didBecomeReady and _bootPromise is the best combination i found. We could remove the initalizers, but i'm not sure if didBecomeReady and _bootPromise also work on older ember versions |
@patricklx gotcha, could we combine the PRs into one and close any that are not needed? I would like to merge the boot fixes all as one, so if anything breaks we can easily revert. |
@chancancode @teddyzeenny @rwjblue do any of you have thoughts on this PR? If there are no objections, I am inclined to merge and see how it works. I don't really know how all the boot stuff works here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the interest of fixing these things, going to approve. If anyone later has ideas to simplify things, please let us know!
this happens when ember inspector was already opened and the app is reloaded. (e.g. during development). in that case it can happen that ember_debug is loaded before ember. It would use the requireModule provided by ember_debug instead of the ember provided one.
this will also cause e.g requireModule('@ember/array') https://github.com/emberjs/ember-inspector/blob/master/ember_debug/utils/ember/array.js#L6 to return an empty object