ember-cli / ember-cli/ember-cli
Unable to override addon re-exports in the consumer application
- 主要言語
- JavaScript
- スター
- 3.2k
- フォーク
- 1.2k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 8
説明
[repo](https://github.com/beatle/emcli-templates-collision-repro) with reproduction. This reproduction is based on a dummy app but it's also reproducible within a host app.
Steps to reproduce:
```
$ ember g template test
$ ember g template test --dummy
```
produces following files:
- addon/templates/test.hbs
- app/templates/test.js
- tests/dummy/app/templates/test.hbs
- ...
Now if you run the build it will fail with an `EEXIST` exception:
```
ember build
...
EEXIST, file already exists '/home/beatle/workspace/ember-cli-apps/c/tmp/template_compiler-output_path-beowNp4d.tmp/dummy/templates/test.js'
Error: EEXIST, file already exists '/home/beatle/workspace/ember-cli-apps/c/tmp/template_compiler-output_path-beowNp4d.tmp/dummy/templates/test.js'
at Error (native)
at Object.fs.symlinkSync (fs.js:848:18)
at symlink (/home/beatle/workspace/ember-cli-apps/c/node_modules/symlink-or-copy/index.js:82:14)
at symlinkOrCopySync (/home/beatle/workspace/ember-cli-apps/c/node_modules/symlink-or-copy/index.js:58:5)
at TemplateCompiler.Filter._handleFile (/home/beatle/workspace/ember-cli-apps/c/node_modules/broccoli-persistent-filter/index.js:101:12)
at TemplateCompiler. (/home/beatle/workspace/ember-cli-apps/c/node_modules/broccoli-persistent-filter/index.js:88:21)
at /home/beatle/workspace/ember-cli-apps/c/node_modules/promise-map-series/index.js:11:14
at lib$rsvp$$internal$$tryCatch (/home/beatle/workspace/ember-cli-apps/c/node_modules/rsvp/dist/rsvp.js:493:16)
at lib$rsvp$$internal$$invokeCallback (/home/beatle/workspace/ember-cli-apps/c/node_modules/rsvp/dist/rsvp.js:505:17)
at lib$rsvp$$internal$$publish (/home/beatle/workspace/ember-cli-apps/c/node_modules/rsvp/dist/rsvp.js:476:11)
```
As I can see after some debugging it happens when broccoli tries to save compiled `tests/dummy/app/templates/test.hbs` to the `tests/dummy/app/templates/test.js` where the `app/templates/test.js` is merged already.
A little bit strange but this error happens only on cold starts and works ok on rebuilds.
コントリビューションガイド
調査の方向性
リンクされた再現リポジトリから開始し、2つの ember g template コマンドを実行して、コールドスタート時に ember build で失敗を再現します。TemplateCompiler.Filter._handleFile を通じて衝突を追跡し、マージされた app/templates/test.js とコンパイルされた tests/dummy/app/templates/test.hbs の出力に重点を置きます。コールドビルドが EEXIST なしで成功し、consumer の override が引き続き有効であれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- build-system, cli
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100