Hi,
I updated my project to the newly released Ember 3.20. and I get the WARN: DEPRECATION: setSourceDestroying is deprecated, use the destroy() API to destroy the object directly instead [deprecation id: meta-destruction-apis]
even though I updated glimmer to 1.0.1, like it is specified in the release notes. Is there a way to fix this message?
This is my package json file:
Thanks,
Bogdan
There were two common addons that I was aware of that triggered this deprecation: ember-modifier
and @glimmer/component
. The blog post mentioned the @glimmer/component@1.0.1
release but didn’t mention the ember-modifier@1.0.4
release.
Can you take a look at the results of these commands to see if you happen to have an outdated version of one of these?
- if you use
yarn
yarn why @glimmer/component
yarn why ember-modifier
- if you use
npm
npm ls @glimmer/component
npm ls ember-modifier
It makes more sense now. This is the output:
❯ yarn why @glimmer/component
yarn why v1.22.4
[1/4] Why do we have the module "@glimmer/component"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "@glimmer/component@1.0.1"
info Has been hoisted to "@glimmer/component"
info This module exists because it's specified in "devDependencies".
info Disk size without dependencies: "3.07MB"
info Disk size with unique dependencies: "24.05MB"
info Disk size with transitive dependencies: "97.38MB"
info Number of shared dependencies: 247
=> Found "ember-power-select#@glimmer/component@1.0.0"
info This module exists because "ember-power-select" depends on it.
info Disk size without dependencies: "1.37MB"
info Disk size with unique dependencies: "22.29MB"
info Disk size with transitive dependencies: "95.68MB"
info Number of shared dependencies: 247
=> Found "ember-basic-dropdown#@glimmer/component@1.0.0"
info This module exists because "ember-power-select#ember-basic-dropdown" depends on it.
info Disk size without dependencies: "1.06MB"
info Disk size with unique dependencies: "21.98MB"
info Disk size with transitive dependencies: "95.36MB"
info Number of shared dependencies: 247
Done in 2.31s.
❯ yarn why ember-modifier
yarn why v1.22.4
[1/4] Why do we have the module "ember-modifier"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "ember-modifier@1.0.3"
info Reasons this module exists
- "ember-click-outside" depends on it
- Hoisted from "ember-click-outside#ember-modifier"
- Hoisted from "ember-infinity#ember-in-viewport#ember-modifier"
info Disk size without dependencies: "624KB"
info Disk size with unique dependencies: "19.85MB"
info Disk size with transitive dependencies: "92.75MB"
info Number of shared dependencies: 224
Done in 1.51s.
Good news! All of those deps should allow the new versions that have the deprecation fixed!
You’ll need to ensure that ember-power-select
, ember-click-inside
, and ember-infinity
have their transitive dependencies updated to the latest. There are a few ways to do that, but these are the most common ones that I use:
- re-roll your lock file (
rm yarn.lock && yarn
)
- reinstall the specific top level deps (
yarn install ember-power-select ember-click-inside ember-infinity
)
- you can use resolutions to force the nested deps to the version you want, run yarn, then remove the resolution (you really don’t want to be running with resolutions in the long run IMHO), run yarn again
Any of those should do the trick for you.
3 Likes