-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Unexpected angle-bracket component invocation. #17744
Comments
Ya, this should assert /cc @chancancode |
@rwjblue I know how to add the assert via the same ast transform (basically turning it into |
I don't understand why this would be implemented as an assertion before invocation rather than making sure invocation never supports strings? I would have thought that invoking a string is an opt-in behavior that requires wrapping in |
Mostly just a hack before implementing it in glimmer can and updating to use the latest glimmer vm here. This assertion already exists for curlies etc. Part of the reason is a lot of the dynamic invocations are themselves hacked on top in ember via ast transforms without proper vm support. The reason the curly/dot rule version fails is because we literally transform them into component helpers, which do support strings. |
FYI - I submitted a failing test for this over in glimmerjs/glimmer-vm#1149. Did some digging with @krisselden and @pzuraq to determine what is the real cause (usage of |
I don't see how this was an issue? I was using this and thought it was a nice feature. Was nice not having to hack around the broken attributes with the component helper (I couldn't just swap in the helper, I have to use |
It’s a big deal because of the way it defeats static analysis. An app that does this anywhere can’t shake out unused components everywhere. For some alternative ways to get the component invocation you want, see https://github.com/embroider-build/embroider/blob/master/REPLACING-COMPONENT-HELPER.md. Depends on your use case, but the patterns suggested there might help. |
Well looks like this has done more than stop strings. I get an infinite loop until I run out of memory now if I use a component passed in a hash that is made using the helper. |
I just tried to reproduce that and couldn't. If you can make it happen reliably please file an issue with the reproduction and I'll take a look. |
It was due to something changing with helpers and a |
Given:
foo-bar
.component-or-controller
context-related template
<this.someName />
result
foo-bar
component rendered, instead of error or<foo-bar />
tag rendering.Reproduction:
https://ember-twiddle.com/#/4d2f5e2d56d204de0a74090e6d728b84?openFiles=templates.application.hbs%2C
May be related to:
1aa4fbb#diff-e6d62c9fc48e7201f4f2e4b9a3d52fa7
The text was updated successfully, but these errors were encountered: