ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

[Bug] Duplicate `remove` logs when destroying a blueprint

Open bertdeblock opened this issue 3 years ago • 2 comments
trafficstars

🐞 Describe the Bug

Since v4.4.1, destroying e.g. a component shows duplicate remove logs:

uninstalling component
  remove addon/components/foo.hbs
uninstalling component-test
  remove tests/integration/components/foo-test.js
  remove tests/integration/components/foo-test.js (duplicate)
uninstalling component-addon
  remove app/components/foo.js
  remove app/components/foo.js (duplicate)

🔬 Minimal Reproduction

npx ember-cli addon foo
cd foo
ember g component foo
ember d component foo

It's also reproducible when generating an app, or destroying e.g. a controller, route, ...

😕 Actual Behavior

Duplicate remove logs are being printed when running the ember d component foo command.

🤔 Expected Behavior

The remove logs are printed only once per blueprint type (main, test, addon).

🌍 Environment

  • Ember: v4.4.1
  • Node.js/npm: v16 / Yarn v1
  • OS: macOS
  • Browser: N/A

➕ Additional Context

The issue does not happen on Ember < v4.4.0. This seems related to https://github.com/emberjs/ember.js/pull/19962. It's not yet clear to me if that PR is the actual cause or if something else is wrong.

bertdeblock avatar Jun 13 '22 18:06 bertdeblock

Hey, could you tell me which files should I be looking into for this issue? Thanks

kirtan-desai avatar Jun 22 '22 22:06 kirtan-desai

@kirtan-desai My initial idea was that this line could be related: https://github.com/emberjs/ember.js/pull/19962/files#diff-e1d24ae1c27f7810153391ad26d343a5e940afd53cceff9fe1d87046ade6730dR15

Not sure though, haven't looked into it any further, but the PR linked in this issue's description is most likely the culprit.

bertdeblock avatar Jun 29 '22 20:06 bertdeblock

Seems "fixed" since we've enabled the EMBER_TYPESCRIPT_BLUEPRINTS flag by default.

bertdeblock avatar Jul 19 '23 10:07 bertdeblock