question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@ember/test-helpers 2.8.0 breaks embroider-optimized scenario

See original GitHub issue

2.8.0 causes following issue:

ERROR in …/node_modules/@ember/test-helpers/setup-rendering-context.js Module build failed (from …/…/…/…/home/runner/work/tracked-built-ins/tracked-built-ins/node_modules/thread-loader/dist/cjs.js): Thread Loader (Worker 0) $TMPDIR/embroider/f71d26/node_modules/@ember/test-helpers/setup-rendering-context.js: Unsafe dynamic component: this.ProvidedComponent in $TMPDIR/embroider/f71d26/node_modules/@ember/test-helpers/setup-rendering-context.js

Can be seen in https://github.com/tracked-tools/tracked-built-ins/runs/6480181579?check_suite_focus=true

I believe Embroider complaints about this line:

https://github.com/emberjs/ember-test-helpers/blob/master/addon-test-support/@ember/test-helpers/setup-rendering-context.ts#L27

Introduced in https://github.com/emberjs/ember-test-helpers/pull/1211/files#diff-be714ad7ae4501cdbd6b1b7ff97b6e0e5b7c73192119f2e0758b5354d72fcd37

Due to complexity of the setup, this does not seem straightforward fix to me.

Seem like one of the options is to configure packageRules, but seem not possible from the addon.

cc @chriskrycho

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rwjbluecommented, May 19, 2022

That fix landed and was released in 2.8.1

1reaction
rwjbluecommented, May 19, 2022

FWIW, I noticed that 2.8.0 already added @embroider/macros@1 (which had the Node version issue that I mentioned above), so I just submitted https://github.com/emberjs/ember-test-helpers/pull/1221 to just use @embroider/util. It doesn’t make things worse and so far no one has raised an issue RE: Node 10 support being dropped.

https://github.com/emberjs/ember-test-helpers/pull/1221 should unblock folks leveraging Embroider optimized builds, if we get folks raising issues RE: Node 10 we can fix by inlining the ensureSafeComponent code. I just don’t want to proactively do all that work (just to throw it away) if no one actually cares. 😩

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · emberjs/ember-test-helpers - GitHub
Test -framework-agnostic helpers for testing Ember.js applications - Issues ... @ember/renderer work in 2.8.0/2.8.1 not compatible with prior ember releases.
Read more >
@ember/test-helpers: Versions | Openbase
Full version history for @ember/test-helpers including change logs.
Read more >
@embroider/macros | Yarn - Package Manager
A standardized solution for modifying your package's Javascript and Glimmer templates at app-compilation-time. Motivation. Traditionally, Ember addons have a ...
Read more >
Embroider build - Build Issues - Ember.JS
ember -cli: 3.10.1 node: 10.15.1 Im testing embroider for code splitting. but I cannot even make successful build for a basic ember app....
Read more >
Source - GitHub
v4.4.2 (June 13, 2022) - [#20114](https://github.com/emberjs/ember.js/pull/20114) [BUGFIX] Fix generated import paths for test setup functions in addons ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found