Add build mode tests (ensuring isDevelopingApp and isTesting are appropriately true when they need to be (as well as assert-stripping))#66
Conversation
| "c8": "^7.11.3", | ||
| "ember-cli": "github:ember-cli/ember-cli#master", | ||
| "execa": "^9.5.2", | ||
| "execa": "^9.6.0", |
There was a problem hiding this comment.
could be PR'd separately
| addonDir = join(tmpDir, addonName); | ||
| await execa({ | ||
| cwd: tmpDir, | ||
| extendEnv: false, |
There was a problem hiding this comment.
extendEnv is noise in this PR without an accompanying env: {} to set the env to empty
|
Would be nice to get this PR In ember-basic-dropdown i have |
8a895fd to
da5827f
Compare
|
@NullVoxPopuli the fix of this branch works only partially... I have an issue found out with ember-power-select and ember-basic-dropdown. When the If you run this in ember app test (like ember-power-select docs), If you want test this issue, you can do this with following steps.
The |
|
Today i have again debugged the issue from power select / basic dropdown. I have moved macro to peerDep in ember-basic-dropdown, but this hasn't solved the issue... The only way to get inside basic dropdown Inside Maybe the best and clean way will be, that addon's which are using |
|
what happens if you remove |
tried locally with an patch, removing in ember-basic-dropdown the |
d8c6aa6 to
2128af4
Compare
what happens when you cd into |
|
|
I would expect macros to not return a result, if you're testing in a full app, fwiw -- this leads me to believe a potential peer issue - maybe injected deps are needed |
|
@NullVoxPopuli and I debugged the macros issue via DMs. It appears to occur only in the browser ( For investigation, we first tried reproducing the issue in a monorepo setup with two addons, but were unable to reproduce it (see test repo: https://github.com/mkszepp/macro-issue-v2-addon). We then created two separate repositories with minimal code and were able to reproduce the same issue we’re seeing in power-select with basic-dropdown. This suggests the problem is within You can use the following repositories to reproduce the issue:
To reproduce:
You’ll see the tests fail. However, if you run |
|
it looks like the issue is in embroider... if we remove this lines in embroider the issue is fixed... |
|
We shouldn't invoke private API with a ton of lint & type exceptions in the blueprint output. We need to fix this properly so there's public API for causing isTesting to go true. |
|
Will repon when embroider-build/embroider#2662 (or better) is merged and released -- as we still need the tests |
|
This is back with |
files/package.json
Outdated
| "@embroider/compat": "^4.1.0", | ||
| "@embroider/core": "^4.1.0", | ||
| "@embroider/macros": "^1.18.0", | ||
| "@embroider/macros": "^1.20.0", |
There was a problem hiding this comment.
min version of macros required
|
@NullVoxPopuli i have tested the new way for testing, but it looks like the issue from isTesting (in browser) is still present. Is there anything else we need todo? (i have updated all dependencies to latest, removed node_modules folder and package-lock.json file).
Here the updated repos |
1d7b058 to
6eb50a8
Compare
|
@mkszepp this branch is fully operational |
|
@NullVoxPopuli i will try tomorrow to update embroider macros from 1.20.0 to 1.20.1 to test if the issue is solved |
|
@NullVoxPopuli the issue is still present (also with
I have tried with and without dependency of macros in macros-bug-my-addon-1 (we had removed in any test a time ago) Feel free to test the issue with this repos
As reminder when the issue occures:
Module tree in browser (there is always a runtime.js and runtime.js with ?v..., this can only be avoided by patching the lines in embroider/vite): |
|
What happens if you remove @embroider/macros from your libraries' deps and devDeps (keeping only the code, and the devDep for the vite you're running?) |
|
my reported issue in browser will be fixed with embroider-build/embroider#2683 |
e1bc467 to
b36a28e
Compare





followup to: #64
Key changes:
@glimmer/envforDEBUGsupport (only for the dev/test babel.config)@embroider/macros