-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Restructure Ember.libraries to be more idiomatic. Fixes #9291 #9312
Conversation
29b6f9f
to
2758a22
Compare
@stefanpenner Looks like this might have been in vain. ember-inspector makes the assumption that https://github.com/emberjs/ember-inspector/blob/e7cc751cd5d934c6ac55159c6a94e1c2f7e8be24/dist_common/in-page-script.js#L7 etc. |
2758a22
to
87368fe
Compare
Passing now. Had to account for |
@jayphelps - the concern about ember-inspector still needs to be addressed right? |
cc @teddyzeenny |
@rwjblue Yep. Needs to be addressed either in this PR or inspector. Maybe a combination of both during a transitional phase. One thought..I can mock the array-like behavior, adding deprecation warnings for anyone else who might happen to be depending on that. and provide a more public API that inspector can switch over to. I'd be happy to do the PR work on inspector as well if this sounds acceptable. Otherwise I'm open to suggestions.. |
We can easily update the inspector (it should keep supporting the old version though). I'm more worried about |
So basically....I've been banging my head the past couple days trying to actually implement these changes in a way that A. won't break old Ember Inspector's, B. preferably not break third parties using the existing array-like behavior. I tried mocking the array-like behavior and quickly found existing Ember Inspector doesn't just expect it to have array-like methods, it also expects it to basically be an array. I couldn't find a way to mock the array-like behavior in a way that We can't actually extend the SO...now I basically came full circle. I don't think there's anything that can be done about this without breaking old inspectors and third party code that relies on this. I'm stuck, so if anyone has a solution please let me know. Maybe there's some way we can do both the old way with a real array and a new way for a transitional period? That's the only way I know of. At the very least, we can stop using the |
@jayphelps thanks for spending time on this. There are no old versions of the inspector, it's always auto-updated to the latest version everywhere, so no need to worry about inspector issues, we'll just update it and publish. The only thing to worry about is other libraries. If we can assume that they just use it to register themselves, then just keeping the method |
@teddyzeenny If we're okay with that, then we're golden. AFAIK Chrome extensions don't apply the auto updates until the browser is restarted though, like Chrome itself? If we're OK with breaking that? We can add a warning that they're likely using an outdated version of inspector, is there a way to access the inspector version number? I see it's injected into the inspectors container at |
@teddyzeenny @stefanpenner is this good to go? |
@teddyzeenny r? |
@wagenet I was hoping to get some feedback from @teddyzeenny. (See my last comment) This PR is NOT ready, but I'll go ahead and guess what he'll say and go off that. |
@jayphelps let's not worry about the inspector. I'm always working under the assumption that everyone has the latest inspector version. |
@jayphelps - What is left here? If nothing, then it needs a rebase... |
Will need a rebase. |
5e7063a
to
4d37df5
Compare
@rwjblue Rebased and AFAIK ready. On the inspector side, emberjs/ember-inspector#263 is needed. Cc/ @teddyzeenny |
Looks good to me. I think we need to merge and release emberjs/ember-inspector#263 before merging this (otherwise inspector blows up for canary apps). @teddyzeenny - Can you let us know when we are good to merge here? |
Changes where we find the Ember.libraries array of registered libs that changed with emberjs/ember.js#9312
New Ember Inspector version released. This can be merged. |
👍 you are welcome to merge @teddyzeenny (i know you have commit bit) |
Restructure Ember.libraries to be more idiomatic. Fixes #9291
Requested by @stefanpenner #9291