-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
[BUGFIX] Updates internals for Ember Canary #277
Conversation
Hey @pzuraq can you give me some advice/help on getting So what I'm trying to figure out is a solution that will work with |
Ah, that's interesting. I think the only way for us to support this behavior would actually be to continue to add the |
Well, it's kinda ugly and I'm not happy about how it encodes an assumption about the arguments that the framework passes to @pzuraq I'm curious to hear your thoughts -- is there a cleaner way to effectively wrap a computed property/descriptor? I suppose another approach would be to instrument the task property. Maybe:
What are your thoughts on which approach would be best? cc: @machty |
Okay, I hashed out my second proposal, and I kinda like how it turned out. Here is the proposed change to this PR, and here is the corresponding change to I think it's nice and clean and doesn't violate encapsulation or encode brittle assumptions about how Ember (or even @pzuraq I have some time to work on moving this whole thing forward if you can help me with:
|
I'm ok with that proposal, I would like to see what @machty thinks since it would essentially be a new public API and may incur some runtime cost. The nice thing about using a For your remaining questions:
if (gte('3.9.0')) {
} else {
} The first code block will run if the version is 3.9.0+, including betas and canaries. The additional flags were harder to maintain since there are so many of them, so we aren't really using them anymore.
|
I will try to catch up on this over the weekend. Could someone please summarize the main thing(s) that changed about Descriptors that are impacting ember-concurrency? |
Descriptors are now spec compliant decorator functions, and have changed significantly under the hood. We have a new implementation that works, but it will be incompatible with older versions of Ember. This won’t be a problem as we can use ember-compatibility-helpers to ship the correct version. However, a sideeffect of this is making most of the implementation details of descriptors much more private, and in turn making more of the implementation details of ember-concurrency more private. @bendemboski’s addon was relying on these private implementation details to create a test-waiter, so we need to figure out how to make them public-ish, or make it clear it’s not a supported use case. |
Still haven't dug in deeply but it seems like it's making more and more sense to have an official ember-concurrency middleware API for decorating/wrapping/extending task functions, so that separate e-c plugins don't have to know anything about Random thought but I believe there's an issue with trying to wrap a task generator fn with |
yes, it subtly alters how the task runs. Basically, in vanilla e-c right now (no wrapping), the part before the first It would be a subtly breaking change to wrap by default, but it's one that's already being incurred via either |
Status update here: Currently waiting on some pending changes to the implementation, it looks like we may revert it from the 3.9 beta and wait until 3.10 to land it due to that, give us some more time to handle things. Should know by the core team meeting on Friday! |
FYI - we (but really @pzuraq) did revert the changes for 3.9 (current beta) over in emberjs/ember.js#17649, to buy us more time to experiment with the feature on canary. Thank you @pzuraq! |
`ember-concurrency` does not work with the current Ember beta, and it is used by `ember-addon-docs`. Until something like machty/ember-concurrency#277 makes `ember-concurrency` work again, or emberjs/ember.js#17649 is released to the beta channel to remove the breaking change, we need to allow failures in beta :(
Just checked, it's looking like it'll be cut later tonight, but definitely by tomorrow at the latest. Sorry for the delays! |
Beta.2 is out, should be fine! |
22ffbe3
to
601c424
Compare
Updates the usage of the ComputedProperty APIs for TaskProperty to use the Decorator API in the latest versions of Ember. Uses `ember-compatibility-helpers` to remain compatible with older versions of Ember.
3e6fcad
to
7b8e5a3
Compare
This is ready to review! |
I just tried your PR with the latest canary:
I had errors before, that went away -> #worksforme ;) |
Co-Authored-By: pzuraq <[email protected]>
I can also confirm that machty/ember-concurrency-decorators#39 works with this branch! 🎉 |
I still don't deeply understand the new vs old mechanics and limitations of descriptors and how that's impacted e-c (and I probably won't til I have more time and/or need to dig into to fix an low-level issue), but this PR looks good and I'm happy to merge. @maxfierke does this PR still risk introducing the execution corner case bugs mentioned earlier? @bendemboski does this PR now work with your e-c-test-waiters addon? |
Yeah, thanks to this and related changes (and @pzuraq!) this branch works with |
@machty nope, should be okay, as It works with |
We just landed some pretty major changes to the Descriptor system
upstream. We verified that ember-concurrency would still be able to work
first, this branch is that work. We should likely update it to use
ember-compatibility-helpers
as well, so you can continue to supportolder versions of Ember at the same time.