zestia / ember-select-box

:capital_abcd: A faux select box for Ember apps
MIT License
64 stars 14 forks source link

Ember 3.22.0 double compute issue in version 14.x #30

Closed robclancy closed 3 years ago

robclancy commented 3 years ago

You can reproduce with your own tests. Just checkout version 14 and run tests.

Uncaught Error: Assertion Failed: You attempted to update `tabIndex` on `SelectBox`, but it had already been used previously in the same computation.  Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.

`tabIndex` was first used:
Stack trace for the update:
    at setter (validator.js:833)
    at SelectBox.set [as tabIndex] (index.js:3908)
    at enable (disabled.js:23)
    at receiveDisabled (disabled.js:13)
    at new SelectBox (index.js:199)
amk221 commented 3 years ago

I checked out the 14x tag and updated to Ember 3.22.0. It does output a load of:

DEPRECATION: You attempted to update `tabIndex` on `SelectBox`, but it had already been used previously in the same computation.  Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.

`tabIndex` was first used:

- While rendering:
  application
    index
      select-box

...but all the tests pass.

Do you have any more details for how to make it error, like your example

robclancy commented 3 years ago

That's because they changed it in 3.22.2 and you must have tested that version. https://github.com/emberjs/ember.js/pull/19282