You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ember-concurrency >=0.8.24 it seems lastSuccessful, bound within a computed macro, does not compute if another computed is referencing the task as a dependent key and only in production builds. This bug is present only in ember-source@>=3.5.0.
Quite the bug and I plan to bisect soon now that I've duplicated in an example app.
It's worth noting, this code works fine in 0.8.22.
exportdefaultController.extend({lastSuccessful: readOnly('searchRepo.lastSuccessful.value'),// Uncomment this block and bug will not be present// lastSuccessful: computed('searchRepo.lastSuccessful.value', function() {// return this.get('searchRepo.lastSuccessful.value');// }).readOnly(),hasResults: computed('lastSuccessful','searchRepo.isRunning',function(){// accessing a prop triggers the bug (happens with isIdle as well)this.searchRepo.isRunning;returnthis.get('lastSuccessful.length')>0;}),searchRepo: task(function*(term){if(isBlank(term)){return[];}letres=yieldfetch(`https://api.github.com/search/repositories?q=${term}`);letjson=yieldres.json();returnjson.items.slice(0,10);})});
The text was updated successfully, but these errors were encountered:
jasonmit
changed the title
lastSuccessful does not recompute in prod buildslastSuccessful does not recompute in prod builds when used with computed macros
Jan 29, 2019
jasonmit
changed the title
lastSuccessful does not recompute in prod builds when used with computed macros
Task does not recompute in prod builds when used with computed macros
Jan 29, 2019
jasonmit
changed the title
Task does not recompute in prod builds when used with computed macros
Task does not recompute in prod builds when passed into a computed macro (alias, oneWay, readOnly, etc.)
Jan 29, 2019
In ember-concurrency
>=0.8.24
it seemslastSuccessful
, bound within a computed macro, does not compute if another computed is referencing the task as a dependent key and only in production builds. This bug is present only inember-source@>=3.5.0
.Quite the bug and I plan to bisect soon now that I've duplicated in an example app.
It's worth noting, this code works fine in 0.8.22.
Reproduction:
git clone git@github.com:jasonmit/ember-concurrency.git
ember s -e=production
http://localhost:4200/docs/examples/autocomplete
tests/dummy/app/docs/examples/autocomplete/controller.js
and uncomment line 12-14 and comment out line 9 and SaveThe text was updated successfully, but these errors were encountered: