Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential issue with mismatched @ember/test-waiters in dep graph #1056

Open
thoov opened this issue Dec 16, 2021 · 2 comments
Open

Potential issue with mismatched @ember/test-waiters in dep graph #1056

thoov opened this issue Dec 16, 2021 · 2 comments

Comments

@thoov
Copy link
Collaborator

thoov commented Dec 16, 2021

There seems to be an issue when yarn why @ember/test-waiters has multiple versions. highlander code might be a place to investigate.

Reproductions steps:

  1. ember new foobar --yarn
  2. yarn add --dev @embroider/core @embroider/compat @embroider/webpack webpack
  3. ember install @ember/test-waiters@2.4.5

Finally add to ember-cli-build.js:

const { Webpack } = require('@embroider/webpack');
return require('@embroider/compat').compatBuild(app, Webpack);

Result

Then run ember b and you will encounter the following error:

Build Error (WaitForTrees)

ENOENT: no such file or directory, open '/private/var/folders/61/n399scw50nq264twrz32ccgr000vkn/T/embroider/b8ef3e/node_modules/@ember/test-helpers/node_modules/@ember/test-waiters/package.json'


Stack Trace and Error Report: /var/folders/61/n399scw50nq264twrz32ccgr000vkn/T/error.dump.5c2dc6c6019426ac6515ab214b869a0d.log
@thoov
Copy link
Collaborator Author

thoov commented Dec 16, 2021

cc: @ef4

@angelayanpan
Copy link
Collaborator

maybe related to this: #778 (comment) ??

ef4 added a commit that referenced this issue Jan 6, 2022
The OneShot transform consumes a broccoli tree a single time, detaching us permanently from future updates to that tree, which avoids needing to revalidate all the third-party v1-to-v2 addon conversion during rebuilds.

Since OneShot fully consumes a broccoli tree in a separate broccoli pipeline, it's not safe to consume that same tree again in a different pipeline.

But an addon can manipulate cacheKeyForTree such that two distinct copies of an addon emit the same broccoli tree instance as their v2Tree, which we send into OneShot. This fails in a very byzantine way.

It's the source of the problems people have been having with test-waiters (#1056) because that addon aggressively tries to deduplicate itself.

The fix is to not rerun OneShot if we encounter an identical tree a second time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants