-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add support for nested invocation with ::
#59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI failures on ember-source >= 3.4.0 < 3.10.0-beta.1
are because the AST transform that was updated here is not currently ran for ember-source >= 3.4.0, and the underlying system does not support template:components/foo::bar
as a valid name.
The fix is to add another AST transform that runs only on ember-source < 3.10.0-alpha.1 that transforms from this:
<Foo::Bar />
To:
{{#let (component 'foo/bar') as |FooBar_AGLPLYFL|}}
<FooBar_AGLPLYFL />
{{/let}}
@rwjblue yeah I didn't see that I only had run default try scenario and didn't catch. I wondered if the AST was noop in 3.4+. Updating to the two AST approach. |
Co-Authored-By: rtablada <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm whipping up some tweaks to the transform, will push in a minute so you can review and let me know what you think...
* Ensures only one `let` is ever created * Reuses the same yielded block param for every invocation of the same underlying component * Ensures that `Foo::Bar::Baz` works (arbitrary nesting levels) * Uses custom suffix to ensure no block param collisions exist
@rtablada - Ready for review, lemme know what you think... Also, you can poke at the transform and see it "live" here: https://astexplorer.net/#/gist/0590eb883edfcd163b183514df4cc717 |
1d7ed15
to
386f2eb
Compare
@rwjblue looks good! I used the ast transformer to debug live to build this! |
::
No description provided.