You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on enabling staticHelpers and staticComponents in our own app, we ran into trouble with ember-animated (ember-animation/ember-animated#594). The solution should be to move the macro into the template so that it can be pruned at build time.
{{#if (macroCondition (macroDependencySatisfies 'ember-element-helper' '>= 0.6.1'))}}
{{! use the new element helper }}
{{else}}
{{! use the old -element helper }}
{{/if}}
I put together a PR which does exactly that, but as you can see (as of this writing) the tests fail because macroCondition and macroDependencySatisfies aren't defined at runtime, which they shouldn't be.
stack: >
Error: Attempted to resolve `macroCondition`, which was expected to be a helper, but nothing was found.
at resolveHelper (http://localhost:4202/assets/vendor.js:28257:15)
at encodeOp (http://localhost:4202/assets/vendor.js:30101:18)
at pushOp (http://localhost:4202/assets/vendor.js:30036:7)
at http://localhost:4202/assets/vendor.js:28458:7
at Compilers.compile (http://localhost:4202/assets/vendor.js:28443:7)
at expr (http://localhost:4202/assets/vendor.js:28601:19)
at http://localhost:4202/assets/vendor.js:29882:5
at Replayable (http://localhost:4202/assets/vendor.js:29067:17)
at ReplayableIf (http://localhost:4202/assets/vendor.js:29124:12)
at http://localhost:4202/assets/vendor.js:29881:52
message: >
global failure: Error: Attempted to resolve `macroCondition`, which was expected to be a helper, but nothing was found.
negative: >
false
browser log: |
{"type":"error","text":"\n\nError occurred:\n\n- While rendering:\n -top-level\n application\n index\n transition-log-table\n logged-sprites\n animated-container\n\n"}
{"type":"error","text":"\n\nError occurred:\n\n\n\n"}
{"type":"warn","text":"Attempted to rerender, but the Ember application has had an unrecoverable error occur during render. You should reload the application after fixing the cause of the error."}
I began to research this, but ran out of time. During my research, it seems like the glimmer AST transformations aren't running on precompiled v2 addon templates. You can see this in the test app within the ember-animated addon. If you run the tests, or run the server and navigate to /demos/container-only, you'll see the error get thrown.
Hacking around in node_modules, the AST transforms are running on the test-app templates, but not for the addon templates it seems. This would seem to stem from the combo of classic builds + v2 addon precompiled templates, but I don't have the knowledge and didn't get enough time to make the connection between the two.
The text was updated successfully, but these errors were encountered:
While working on enabling
staticHelpers
andstaticComponents
in our own app, we ran into trouble withember-animated
(ember-animation/ember-animated#594). The solution should be to move the macro into the template so that it can be pruned at build time.I put together a PR which does exactly that, but as you can see (as of this writing) the tests fail because
macroCondition
andmacroDependencySatisfies
aren't defined at runtime, which they shouldn't be.I began to research this, but ran out of time. During my research, it seems like the glimmer AST transformations aren't running on precompiled v2 addon templates. You can see this in the test app within the
ember-animated
addon. If you run the tests, or run the server and navigate to/demos/container-only
, you'll see the error get thrown.Hacking around in
node_modules
, the AST transforms are running on the test-app templates, but not for the addon templates it seems. This would seem to stem from the combo of classic builds + v2 addon precompiled templates, but I don't have the knowledge and didn't get enough time to make the connection between the two.The text was updated successfully, but these errors were encountered: