Remove macros in favor of import.meta.env?.DEV#21115
Remove macros in favor of import.meta.env?.DEV#21115NullVoxPopuli wants to merge 17 commits intomainfrom
Conversation
Estimated Asset SizesDiff --- main/out.txt 2026-02-17 19:37:18.000000000 +0000
+++ pr/./pr-22431053390/out.txt 2026-02-26 06:45:14.000000000 +0000
@@ -1,62 +1,62 @@
╔═══════╤═══════════╤═══════════╗
║ │ Min │ Gzip ║
╟───────┼───────────┼───────────╢
-║ Total │ 351.99 KB │ 203.84 KB ║
+║ Total │ 432.13 KB │ 245.65 KB ║
╚═══════╧═══════════╧═══════════╝
╔══════════════════════╤═══════════╤═══════════╗
║ @ember/* │ Min │ Gzip ║
╟──────────────────────┼───────────┼───────────╢
-║ Total │ 313.39 KB │ 181.91 KB ║
+║ Total │ 374.14 KB │ 212.81 KB ║
╟──────────────────────┼───────────┼───────────╢
-║ -internals │ 36.65 KB │ 26.22 KB ║
-║ application │ 13.23 KB │ 8.05 KB ║
-║ array │ 13.01 KB │ 7.46 KB ║
-║ canary-features │ 304 B │ 389 B ║
-║ component │ 2.05 KB │ 1.64 KB ║
-║ controller │ 1.96 KB │ 1.41 KB ║
-║ debug │ 11.69 KB │ 8.12 KB ║
+║ -internals │ 56.85 KB │ 36.62 KB ║
+║ application │ 15.84 KB │ 9.12 KB ║
+║ array │ 15.18 KB │ 8.53 KB ║
+║ canary-features │ 298 B │ 386 B ║
+║ component │ 2.06 KB │ 1.57 KB ║
+║ controller │ 1.96 KB │ 1.42 KB ║
+║ debug │ 17.18 KB │ 11.49 KB ║
║ deprecated-features │ 31 B │ 77 B ║
║ destroyable │ 561 B │ 383 B ║
║ enumerable │ 259 B │ 387 B ║
-║ helper │ 1.08 KB │ 811 B ║
-║ instrumentation │ 2.43 KB │ 1.79 KB ║
-║ modifier │ 1.22 KB │ 965 B ║
-║ object │ 35.94 KB │ 22.16 KB ║
+║ helper │ 1.08 KB │ 838 B ║
+║ instrumentation │ 2.46 KB │ 1.77 KB ║
+║ modifier │ 1.24 KB │ 935 B ║
+║ object │ 51.62 KB │ 28.78 KB ║
║ owner │ 159 B │ 178 B ║
-║ renderer │ 630 B │ 487 B ║
-║ routing │ 59.3 KB │ 34.12 KB ║
-║ runloop │ 2.36 KB │ 1.5 KB ║
-║ service │ 1 KB │ 845 B ║
-║ template │ 654 B │ 541 B ║
-║ template-compilation │ 429 B │ 366 B ║
-║ template-compiler │ 123.08 KB │ 59.45 KB ║
-║ template-factory │ 370 B │ 374 B ║
+║ renderer │ 622 B │ 510 B ║
+║ routing │ 70.86 KB │ 40.3 KB ║
+║ runloop │ 2.7 KB │ 1.66 KB ║
+║ service │ 1 KB │ 850 B ║
+║ template │ 646 B │ 522 B ║
+║ template-compilation │ 640 B │ 540 B ║
+║ template-compiler │ 125.23 KB │ 61.2 KB ║
+║ template-factory │ 370 B │ 369 B ║
║ test │ 923 B │ 627 B ║
-║ utils │ 4.11 KB │ 3.6 KB ║
+║ utils │ 4.42 KB │ 3.78 KB ║
║ version │ 55 B │ 131 B ║
╚══════════════════════╧═══════════╧═══════════╝
╔═════════════════╤══════════╤══════════╗
║ @glimmer/* │ Min │ Gzip ║
╟─────────────────┼──────────┼──────────╢
-║ Total │ 38.6 KB │ 21.94 KB ║
+║ Total │ 57.98 KB │ 32.84 KB ║
╟─────────────────┼──────────┼──────────╢
-║ destroyable │ 2.77 KB │ 1.39 KB ║
-║ encoder │ 81 B │ 171 B ║
+║ destroyable │ 4.66 KB │ 2.29 KB ║
+║ encoder │ 740 B │ 791 B ║
║ env │ 38 B │ 87 B ║
-║ global-context │ 886 B │ 545 B ║
-║ manager │ 977 B │ 608 B ║
-║ node │ 175 B │ 260 B ║
-║ opcode-compiler │ 1.11 KB │ 894 B ║
+║ global-context │ 2.23 KB │ 1.22 KB ║
+║ manager │ 6.5 KB │ 3.29 KB ║
+║ node │ 1.05 KB │ 881 B ║
+║ opcode-compiler │ 1.11 KB │ 929 B ║
║ owner │ 159 B │ 202 B ║
-║ program │ 252 B │ 301 B ║
-║ reference │ 548 B │ 531 B ║
-║ runtime │ 10.32 KB │ 5.32 KB ║
-║ tracking │ 1.34 KB │ 1.16 KB ║
-║ util │ 1.94 KB │ 1.68 KB ║
-║ validator │ 15.75 KB │ 6.96 KB ║
-║ vm │ 495 B │ 569 B ║
+║ program │ 367 B │ 324 B ║
+║ reference │ 3.51 KB │ 2.42 KB ║
+║ runtime │ 10.32 KB │ 5.2 KB ║
+║ tracking │ 2.11 KB │ 1.8 KB ║
+║ util │ 1.94 KB │ 1.71 KB ║
+║ validator │ 20.95 KB │ 9.85 KB ║
+║ vm │ 495 B │ 575 B ║
║ wire-format │ 1.84 KB │ 1.35 KB ║
╚═════════════════╧══════════╧══════════╝
Details
|
This will require a dev environment to enable (or manually setting import.meta.env.DEV = true. Otherwise prod behavior will be received.
24a3103 to
8231942
Compare
|
@copilot -- why are the firefox tests failing? https://github.com/emberjs/ember.js/actions/runs/22373598336/job/64760184334?pr=21115 |
|
@NullVoxPopuli I've opened a new pull request, #21116, to work on those changes. Once the pull request is ready, I'll request review from you. |
…or in Firefox Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
…o vite.config.mjs Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Fix Firefox test build: add `import.meta.env?.DEV` replacement plugin to vite.config.mjs
|
@copilot -- why is the "perf script still works" job failing? it runs on macos locally -- logs here: https://github.com/emberjs/ember.js/actions/runs/22418787765/job/64911265511?pr=21115 |
|
@NullVoxPopuli I've opened a new pull request, #21117, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@copilot fix the embroiderVite-basics scenario -- logs and commands available here : https://github.com/emberjs/ember.js/actions/runs/22418787765/job/64911509835?pr=21115 |
|
@NullVoxPopuli I've opened a new pull request, #21118, to work on those changes. Once the pull request is ready, I'll request review from you. |
When building with `vite build --mode test`, import.meta.env.DEV is false, so COMPUTED_GETTERS (a WeakSet) is never initialized. The assert() call in makeComputedDecorator was unconditionally evaluating COMPUTED_GETTERS.has(), causing TypeError: Cannot read properties of undefined (reading 'has'). Guard the .has() call with `import.meta.env?.DEV &&` so it short-circuits before accessing the undefined WeakSet in production/test builds. Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Fix embroiderVite-basics: guard COMPUTED_GETTERS.has() with DEV check
|
@copilot fix whatever went wrong https://github.com/emberjs/ember.js/actions/runs/22427276534/job/64938112498?pr=21115 use browser devtools to debug. |
|
@NullVoxPopuli I've opened a new pull request, #21120, to work on those changes. Once the pull request is ready, I'll request review from you. |
… incorrect string replacements Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Fix assert conditions and incorrect string replacements from import.meta.env?.DEV migration
This does mean that ember-auto-import will need an import.meta.env plugin
observations:
see: #21113