-
Notifications
You must be signed in to change notification settings - Fork 16
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
Block let not working in Addon #26
Comments
Hmm. AST transforms aren't quite as simple as custom babel options (unfortunately). Where is the template snippet you mentioned (is it in |
Also, inline {{#each _items as |item|}}
{{let itemId=(or item.id (concat id '-' (auto-id 10)))}}
{{component (concat 'ui-' type '-item')
id=itemId
value=item
size=size
selected=(includes _selected itemId)
disabled=(includes _disabled itemId)
onClick=(action 'onClick')
onHover=(action 'onHover')
onFocus=(action 'onFocus')
}}
{{/each}} It literally transpiles to what you had originally (so its exactly the same scoping), but I find it much nicer... |
It's in the p.s. I agree inline is cooler but unfortunately it wasn't working on an earlier version of 2.9.x so I jumped to the "working" but "not as cool" block implementation. :) |
Hmm. A few questions:
|
Hmm. I'm slightly confused. In the description of the issue, you mentioned:
But in the screenshot above of |
well i'm confused too ... if you look at the image at the top that is a direct cut-and-paste from the |
@ksnyde - unless I'm just completely missing it, I do not see |
@rwjblue let me jump back to that branch and re-check ... I swear it was but I swear a lot (and not all of it's healthy). 😛 |
Now that said, it was easy enough for me to work around this in my addon (and eliminate a dependency in the process). I kind of need to get through today before a big context shift tomorrow. I had thought that this situation I'm running into would be pretty reproducible when I entered it but if you're not finding it so I'd be happy to close this. |
Hehe, I haven't tried it myself yet. I'm just armchair debugging at this point. 😺 |
@chilicoder what version of ember are you using? |
@Robdel12 2.9.1 |
Screenshot seems to indicate an older version. We don't use an initializer any more. |
its "ember-let 0.4.0" from ember-sparkles. only with this version I could manage to run them on v2.9.1 Now I'm trying to make them run in 2.10.. but no luck) Anyways.. I just shared a symptom. maybe will help to find the cause. |
Would it be possible to upgrade ember-sparkles? They're using the latest released version of ember-let: https://github.com/LocusEnergy/ember-sparkles/blob/master/package.json#L46 |
With 0.5.4 my tests work as expected |
👍 |
@cowboyd but i'm not the topicstarter. maybe we should wait until his report) |
Excellent point. I'll re-open if @ksnyde is still having trouble. |
Ha! Forgot that I was the one who openned this. I had been watching the comments come in and was just happy to hear this seems to have been addressed. My focus is elsewhere at the moment but if for any reason I run back into this I'll give a shout out. |
Version of ember-let:
0.5.2
Ember Version / Ember CLI Version:
Ember Version:
2.9.0-beta.5
Ember CLI Version:
2.9.0-beta.2
Expected Behavior
In a template in an an addon I am using:
In this same addon I have included ember-let in the "dependencies" section of
package.json
. This combination works fine for the dummy app of the addon but when I consume this addon I get the error:Assertion Failed: A helper named "let" could not be found
. The stacktrace is meaningless but I'm not using this addon at all in the consuming app so I think the description above should adequately make this reproducible.Ember Twiddle / Example repo / Failing test:
Not really reproducible in Twiddle due to the Addon-to-Addon-to-App nature of this defect.
The text was updated successfully, but these errors were encountered: