Skip to content
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

Task properties broken in canary #279

Closed
bendemboski opened this issue Feb 11, 2019 · 6 comments
Closed

Task properties broken in canary #279

bendemboski opened this issue Feb 11, 2019 · 6 comments

Comments

@bendemboski
Copy link
Contributor

this commit changes the signature of ComputedProperty's constructor to accept an array, so this passes the wrong arguments and throws a TypeError: Found non-callable @@iterator exception (although for some reason in CI I saw Assertion Failed: A computed property key must be a string, you passed undefined undefined instead).

I'm happy to take a crack at a PR to fix this, but I'm unsure of how. I'll leave a comment in that commit asking the core folks if they have a recommendation, but the only two options I can think of are:

  1. Base it an Ember version check (we'd want to verify that this will be released in Ember 3.8 first)
  2. Use try...catch to invoke it one way, and on failure, try to invoke it the other way (seems pretty sketchy).

Other ideas?

bendemboski referenced this issue in emberjs/ember.js Feb 11, 2019
This PR refactors the Descriptor system in Ember metal, mostly replacing
it with a Decorator system instead. `defineProperty` has been updated to
apply decorators following the currently implemented spec. This means
that the value returned by `computed` goes through the exact same flow
when applied as a decorator using decorator syntax, and applied using
classic syntax.
@pzuraq
Copy link
Contributor

pzuraq commented Feb 11, 2019

See #277

@pzuraq
Copy link
Contributor

pzuraq commented Feb 11, 2019

Also, for how to be compatible with multiple versions at once, we should use ember-compatibility-helpers, since it checks the Ember version at build time which allows us to completely strip out the unused version for folks who aren't using that version.

@bendemboski
Copy link
Contributor Author

Oh, nice, already in progress! Great, thanks for being so diligent and sorry for the extra noise!

@pzuraq
Copy link
Contributor

pzuraq commented Feb 11, 2019

All good, private API changes like this are always a little tricky, and it's good to know when it's affecting people and for visibility in general 😄

@balinterdi
Copy link
Contributor

Unfortunately I get this very error (TypeError: Found non-callable @@iterator) using ember-concurrency 0.9.0 and Ember Octane (which is a quite recent "canary" version).

It originates from this line in ember-animated:
https://github.com/ember-animation/ember-animated/blob/master/addon/components/animated-orphans.js#L91

and fails on this line:
https://github.com/emberjs/ember.js/blob/5e4b58feee/packages/%40ember/-internals/metal/lib/computed.ts#L207

It has worked fine on Ember 3.8 (but that's probably not much help).

@lypborges
Copy link

@balinterdi I just run

rm yarn.lock 
rm -rf node_modules 
yarn install

and fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants