ember-polyfills / ember-angle-bracket-invocation-polyfill

MIT License
76 stars 33 forks source link

Version ^1.1.8 breaks Template Only Components #36

Open josemarluedke opened 6 years ago

josemarluedke commented 6 years ago

Given a template only component (enabled using optional features template-only-glimmer-components), since version 1.1.8 it does not render anymore. Prior version did work fine (1.1.7).

Error: TypeError: capabilities is undefined

resolveLayoutForHandle
opcode-compiler.js:895
_static
opcode-compiler.js:1036
refineInlineSyntax
ember-glimmer.js:6907
compile
opcode-compiler.js:398
compileInline
opcode-compiler.js:853
compileInline
opcode-compiler.js:1312
statementCompiler/<
opcode-compiler.js:181
compile
opcode-compiler.js:41
compile
opcode-compiler.js:702
add
opcode-compiler.js:863
compile
opcode-compiler.js:687
<anonymous>
runtime.js:617
evaluate
runtime.js:46
evaluateSyscall
runtime.js:2896
evaluateInner
runtime.js:2868
evaluateOuter
runtime.js:2860
next
runtime.js:4788
execute
runtime.js:4773
insert
runtime.js:3795
nextInsert
reference.js:666
nextAppend
reference.js:629
sync
reference.js:587
evaluate
runtime.js:3878
execute
runtime.js:3645
rerender
runtime.js:3950
RootState/this.render/_this30.render
ember-glimmer.js:4086
runInTransaction
ember-metal.js:406
runInTransaction self-hosted:988:17 _renderRoots
ember-glimmer.js:4351
_renderRootsTransaction
ember-glimmer.js:4383
_revalidate
ember-glimmer.js:4423
invoke
backburner.js:247
flush
backburner.js:167
flush
backburner.js:326
_end
backburner.js:772
end
backburner.js:514
end
index.js:312
flush
index.js:92
_flush/this._nextFlush<
index.js:76
rwjblue commented 6 years ago

Can you double check if this is a duplicate of https://github.com/rwjblue/ember-angle-bracket-invocation-polyfill/issues/22, and if it is can you help us over there with a reproduction?

josemarluedke commented 6 years ago

@rwjblue I managed to get an isolated reproduction with an error, it's not the same as what I reported above, but it is an error related to template only and angle bracket invocation polyfill.

Also, I don't believe it is the same problem as described in #22.

The error I'm getting now is the following:

TypeError: template.asLayout is not a function

I have made each commit a step by step to reproduce.

https://github.com/josemarluedke/--template-only-angle-brackets-bug

rwjblue commented 6 years ago

Awesome, thank you!

sduquej commented 6 years ago

We ran into similar issues when using the template-only-glimmer-components flag. Our app is temporarily stuck in Ember 3.1 and this error blocks us from using the polyfill.

capabilities is undefined which results in

Uncaught TypeError: Cannot read property 'dynamicLayout' of undefined