Skip to content

Conversation

@NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Oct 22, 2025

We don't need a StrictResolver, because there is no resolving in strict mode.

The resolver that is constructed for the strict renderer is what is used for the whole of that rendering tree.

When a strict-mode component encounters something not in the scope bag, it throws a compile-time syntax error -- so resolution never occurs.

Big thanks to @vlascik for reporting and providing a repro

@NullVoxPopuli NullVoxPopuli changed the title [BUG] Repro from @vlascik - loosemode interop not working with renderComponent [BUG] loosemode interop not working with renderComponent Oct 22, 2025
@github-actions
Copy link

github-actions bot commented Oct 22, 2025

Estimated Asset Sizes

Diff

--- main/out.txt	2025-10-13 19:57:14.000000000 +0000
+++ pr/./pr-18722209612/out.txt	2025-10-22 15:58:24.000000000 +0000
@@ -1,41 +1,41 @@
 ╔═══════╤═══════════╤═══════════╗
 ║       │ Min       │ Gzip      ║
 ╟───────┼───────────┼───────────╢
-║ Total │ 417.63 KB │ 231.54 KB ║
+║ Total │ 417.63 KB │ 231.59 KB ║
 ╚═══════╧═══════════╧═══════════╝
 
-╔══════════════════════╤═══════════╤═══════════╗
-║ @ember/*             │ Min       │ Gzip      ║
-╟──────────────────────┼───────────┼───────────╢
-║ Total                │ 238.38 KB │ 146.55 KB ║
-╟──────────────────────┼───────────┼───────────╢
-║ -internals           │ 34.55 KB  │ 24.85 KB  ║
-║ application          │ 12.71 KB  │ 7.66 KB   ║
-║ array                │ 12.66 KB  │ 7.32 KB   ║
-║ canary-features      │ 304 B     │ 419 B     ║
-║ component            │ 1.07 KB   │ 963 B     ║
-║ controller           │ 1.8 KB    │ 1.36 KB   ║
-║ debug                │ 11.4 KB   │ 7.92 KB   ║
-║ deprecated-features  │ 31 B      │ 77 B      ║
-║ destroyable          │ 561 B     │ 383 B     ║
-║ enumerable           │ 259 B     │ 387 B     ║
-║ helper               │ 823 B     │ 609 B     ║
-║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
-║ modifier             │ 669 B     │ 605 B     ║
-║ object               │ 33.78 KB  │ 20.79 KB  ║
-║ owner                │ 159 B     │ 178 B     ║
-║ renderer             │ 406 B     │ 349 B     ║
-║ routing              │ 58.08 KB  │ 33.44 KB  ║
-║ runloop              │ 2.2 KB    │ 1.33 KB   ║
-║ service              │ 859 B     │ 741 B     ║
-║ template             │ 430 B     │ 357 B     ║
-║ template-compilation │ 429 B     │ 366 B     ║
-║ template-compiler    │ 57.91 KB  │ 30.4 KB   ║
-║ template-factory     │ 94 B      │ 160 B     ║
-║ test                 │ 923 B     │ 627 B     ║
-║ utils                │ 3.93 KB   │ 3.5 KB    ║
-║ version              │ 55 B      │ 131 B     ║
-╚══════════════════════╧═══════════╧═══════════╝
+╔══════════════════════╤═══════════╤══════════╗
+║ @ember/*             │ Min       │ Gzip     ║
+╟──────────────────────┼───────────┼──────────╢
+║ Total                │ 238.38 KB │ 146.6 KB ║
+╟──────────────────────┼───────────┼──────────╢
+║ -internals           │ 34.55 KB  │ 24.85 KB ║
+║ application          │ 12.71 KB  │ 7.63 KB  ║
+║ array                │ 12.66 KB  │ 7.32 KB  ║
+║ canary-features      │ 304 B     │ 419 B    ║
+║ component            │ 1.07 KB   │ 1018 B   ║
+║ controller           │ 1.8 KB    │ 1.36 KB  ║
+║ debug                │ 11.4 KB   │ 7.92 KB  ║
+║ deprecated-features  │ 31 B      │ 77 B     ║
+║ destroyable          │ 561 B     │ 383 B    ║
+║ enumerable           │ 259 B     │ 387 B    ║
+║ helper               │ 823 B     │ 610 B    ║
+║ instrumentation      │ 2.43 KB   │ 1.78 KB  ║
+║ modifier             │ 669 B     │ 601 B    ║
+║ object               │ 33.78 KB  │ 20.79 KB ║
+║ owner                │ 159 B     │ 178 B    ║
+║ renderer             │ 406 B     │ 346 B    ║
+║ routing              │ 58.08 KB  │ 33.45 KB ║
+║ runloop              │ 2.2 KB    │ 1.33 KB  ║
+║ service              │ 859 B     │ 741 B    ║
+║ template             │ 430 B     │ 388 B    ║
+║ template-compilation │ 429 B     │ 366 B    ║
+║ template-compiler    │ 57.91 KB  │ 30.4 KB  ║
+║ template-factory     │ 94 B      │ 160 B    ║
+║ test                 │ 923 B     │ 627 B    ║
+║ utils                │ 3.93 KB   │ 3.5 KB   ║
+║ version              │ 55 B      │ 131 B    ║
+╚══════════════════════╧═══════════╧══════════╝
 
 ╔═════════════════╤═══════════╤══════════╗
 ║ @glimmer/*      │ Min       │ Gzip     ║

Details

This PRmain
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 417.63 KB │ 231.59 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤═══════════╤══════════╗
║ @ember/*             │ Min       │ Gzip     ║
╟──────────────────────┼───────────┼──────────╢
║ Total                │ 238.38 KB │ 146.6 KB ║
╟──────────────────────┼───────────┼──────────╢
║ -internals           │ 34.55 KB  │ 24.85 KB ║
║ application          │ 12.71 KB  │ 7.63 KB  ║
║ array                │ 12.66 KB  │ 7.32 KB  ║
║ canary-features      │ 304 B     │ 419 B    ║
║ component            │ 1.07 KB   │ 1018 B   ║
║ controller           │ 1.8 KB    │ 1.36 KB  ║
║ debug                │ 11.4 KB   │ 7.92 KB  ║
║ deprecated-features  │ 31 B      │ 77 B     ║
║ destroyable          │ 561 B     │ 383 B    ║
║ enumerable           │ 259 B     │ 387 B    ║
║ helper               │ 823 B     │ 610 B    ║
║ instrumentation      │ 2.43 KB   │ 1.78 KB  ║
║ modifier             │ 669 B     │ 601 B    ║
║ object               │ 33.78 KB  │ 20.79 KB ║
║ owner                │ 159 B     │ 178 B    ║
║ renderer             │ 406 B     │ 346 B    ║
║ routing              │ 58.08 KB  │ 33.45 KB ║
║ runloop              │ 2.2 KB    │ 1.33 KB  ║
║ service              │ 859 B     │ 741 B    ║
║ template             │ 430 B     │ 388 B    ║
║ template-compilation │ 429 B     │ 366 B    ║
║ template-compiler    │ 57.91 KB  │ 30.4 KB  ║
║ template-factory     │ 94 B      │ 160 B    ║
║ test                 │ 923 B     │ 627 B    ║
║ utils                │ 3.93 KB   │ 3.5 KB   ║
║ version              │ 55 B      │ 131 B    ║
╚══════════════════════╧═══════════╧══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 179.25 KB │ 84.99 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.19 KB  │ 5.44 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.63 KB  ║
║ reference       │ 5.51 KB   │ 3.18 KB  ║
║ runtime         │ 95.26 KB  │ 42.69 KB ║
║ tracking        │ 989 B     │ 961 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.64 KB  │ 6.86 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝
╔═══════╤═══════════╤═══════════╗
║       │ Min       │ Gzip      ║
╟───────┼───────────┼───────────╢
║ Total │ 417.63 KB │ 231.54 KB ║
╚═══════╧═══════════╧═══════════╝

╔══════════════════════╤═══════════╤═══════════╗
║ @ember/*             │ Min       │ Gzip      ║
╟──────────────────────┼───────────┼───────────╢
║ Total                │ 238.38 KB │ 146.55 KB ║
╟──────────────────────┼───────────┼───────────╢
║ -internals           │ 34.55 KB  │ 24.85 KB  ║
║ application          │ 12.71 KB  │ 7.66 KB   ║
║ array                │ 12.66 KB  │ 7.32 KB   ║
║ canary-features      │ 304 B     │ 419 B     ║
║ component            │ 1.07 KB   │ 963 B     ║
║ controller           │ 1.8 KB    │ 1.36 KB   ║
║ debug                │ 11.4 KB   │ 7.92 KB   ║
║ deprecated-features  │ 31 B      │ 77 B      ║
║ destroyable          │ 561 B     │ 383 B     ║
║ enumerable           │ 259 B     │ 387 B     ║
║ helper               │ 823 B     │ 609 B     ║
║ instrumentation      │ 2.43 KB   │ 1.78 KB   ║
║ modifier             │ 669 B     │ 605 B     ║
║ object               │ 33.78 KB  │ 20.79 KB  ║
║ owner                │ 159 B     │ 178 B     ║
║ renderer             │ 406 B     │ 349 B     ║
║ routing              │ 58.08 KB  │ 33.44 KB  ║
║ runloop              │ 2.2 KB    │ 1.33 KB   ║
║ service              │ 859 B     │ 741 B     ║
║ template             │ 430 B     │ 357 B     ║
║ template-compilation │ 429 B     │ 366 B     ║
║ template-compiler    │ 57.91 KB  │ 30.4 KB   ║
║ template-factory     │ 94 B      │ 160 B     ║
║ test                 │ 923 B     │ 627 B     ║
║ utils                │ 3.93 KB   │ 3.5 KB    ║
║ version              │ 55 B      │ 131 B     ║
╚══════════════════════╧═══════════╧═══════════╝

╔═════════════════╤═══════════╤══════════╗
║ @glimmer/*      │ Min       │ Gzip     ║
╟─────────────────┼───────────┼──────────╢
║ Total           │ 179.25 KB │ 84.99 KB ║
╟─────────────────┼───────────┼──────────╢
║ destroyable     │ 2.7 KB    │ 1.35 KB  ║
║ encoder         │ 596 B     │ 653 B    ║
║ env             │ 38 B      │ 87 B     ║
║ global-context  │ 886 B     │ 545 B    ║
║ manager         │ 12.19 KB  │ 5.44 KB  ║
║ node            │ 2.71 KB   │ 1.81 KB  ║
║ opcode-compiler │ 29.89 KB  │ 13.23 KB ║
║ owner           │ 159 B     │ 202 B    ║
║ program         │ 7.1 KB    │ 3.63 KB  ║
║ reference       │ 5.51 KB   │ 3.18 KB  ║
║ runtime         │ 95.26 KB  │ 42.69 KB ║
║ tracking        │ 989 B     │ 961 B    ║
║ util            │ 3.03 KB   │ 2.29 KB  ║
║ validator       │ 15.64 KB  │ 6.86 KB  ║
║ vm              │ 784 B     │ 798 B    ║
║ wire-format     │ 1.84 KB   │ 1.35 KB  ║
╚═════════════════╧═══════════╧══════════╝

Fix for the failing test -- turns out we don't need a StrictResolver

Also add the reverse test so we don't accidentally enable loosemode in
strict components.
@NullVoxPopuli NullVoxPopuli force-pushed the nvp/renderComponent/loose-mode-interop-not-working branch from 4c666da to ec579cf Compare October 22, 2025 15:57
@NullVoxPopuli NullVoxPopuli changed the title [BUG] loosemode interop not working with renderComponent [BUG release] loosemode interop not working with renderComponent Oct 22, 2025
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review October 22, 2025 15:59
@kategengler kategengler requested a review from ef4 October 22, 2025 16:33
@vlascik
Copy link

vlascik commented Oct 23, 2025

there seems to be also something else going on - in the original repro, the corrected code now passes the first call to renderComponent, but the second one, even if it's the same render function call, explodes again with TypeError: Cannot read properties of null (reading 'syscall')

@NullVoxPopuli
Copy link
Contributor Author

yeah, that is indeed a separate issue -- worthy of a separate PR and repro -- and one that I haven't been able to repro myself consistently.

Lets chat in discord about how to re-create that error

@ef4 ef4 merged commit 5da3f8a into emberjs:main Oct 24, 2025
28 checks passed
@NullVoxPopuli NullVoxPopuli deleted the nvp/renderComponent/loose-mode-interop-not-working branch October 29, 2025 22:42
@kategengler kategengler changed the title [BUG release] loosemode interop not working with renderComponent [BUGFIX release] loosemode interop not working with renderComponent Oct 29, 2025
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

Successfully merging this pull request may close these issues.

3 participants