machty / ember-concurrency

ember-concurrency is an Ember Addon that enables you to write concise, worry-free, cancelable, restartable, asynchronous tasks.
http://ember-concurrency.com
MIT License
691 stars 155 forks source link

Ignore "Accessing __ec_cancel__ is deprecated" errors from Ember Data #464

Closed Turbo87 closed 2 years ago

Turbo87 commented 2 years ago

Resolves https://github.com/machty/ember-concurrency/issues/463

/cc @maxfierke

Turbo87 commented 2 years ago
Error: Accessing hasOwnProperty is deprecated.  Only available methods to access on a promise returned from model.save() are .then, .catch and .finally

unfortunately, that does not seem to work either :-/

/cc @runspired in case you have any suggestions

maxfierke commented 2 years ago
Error: Accessing hasOwnProperty is deprecated.  Only available methods to access on a promise returned from model.save() are .then, .catch and .finally

unfortunately, that does not seem to work either :-/

/cc @runspired in case you have any suggestions

I would argue this is breaking an assumption that you should be able to call methods that a regular Promise would still have (which hasOwnProperty would be one, since it inherits it from Object)

However, if this is in a shipped/release version of Ember Data, we should move forward with the try/catch

Turbo87 commented 2 years ago

I just realized that this is causing issues for us because we are using https://github.com/mixonic/ember-cli-deprecation-workflow with throwOnUnhandled: true, which turns regular deprecation warnings into throw theDeprecation. Ignoring the deprecation instead fixes the issue too, so there is actually no need for changing anything in ember-concurrency :)

Turbo87 commented 2 years ago

FWIW this might also be a viable fix for https://github.com/emberjs/data/pull/7868#discussion_r870672476 😅