Skip to content
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

Template Deprecations (due to bind-attr and classNameBindings) with 1.13+. #34

Closed
rwjblue opened this issue May 18, 2015 · 5 comments
Closed

Comments

@rwjblue
Copy link
Contributor

rwjblue commented May 18, 2015

The addon/templates/components/modal-dialog.hbs is triggering the following deprecations on Canary builds:

DEPRECATION: The `bind-attr` helper ('modules/ember-modal-dialog/templates/components/modal-dialog.hbs' @ L3:C11) is deprecated in favor of HTMLBars-style bound attributes.
        at isBindAttrModifier (/Users/rwjblue/src/work/cardstack/takeoff/bower_components/ember/ember-template-compiler.js:9692:24)
        at /Users/rwjblue/src/work/cardstack/takeoff/bower_components/ember/ember-template-compiler.js:9568:15
        at Walker.visit (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15489:7)
        at visitors.Program (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15499:16)
        at Walker.children (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15522:7)
        at Walker.visit (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15490:12)
        at visitors.BlockStatement (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15510:14)
        at Walker.children (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15522:7)
        at Walker.visit (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15490:12)
DEPRECATION: You're using legacy class binding syntax: classBinding="containerClassNamesString alignmentClass renderInPlaceClass container-class" @ 5:45 in (inline). Please replace with class=""
        at /Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:10241:26
        at each (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:10308:7)
        at /Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:10226:7
        at Walker.visit (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15489:7)
        at visitors.Program (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15499:16)
        at Walker.children (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15522:7)
        at Walker.visit (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15490:12)
        at visitors.BlockStatement (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15510:14)
        at Walker.children (/Users/rwjblue/src/work/foo-bar/bower_components/ember/ember-template-compiler.js:15522:7)
@lukemelia
Copy link
Contributor

@rwjblue what is the best pattern for addons supporting multiple versions of Ember with respect to this kind of thing? Should we have separate versions of the templates and conditionally use the correct one?

@rwjblue
Copy link
Contributor Author

rwjblue commented May 18, 2015

I can see two potential solutions (likely there are more):

  1. Maintain two template files, and implement an treeFor that returns the right one.
  2. Maintain two branches.

Clearly 2 is not great...

@lukemelia
Copy link
Contributor

@rwjblue looking into your suggested solution "1" now, and realized that (unless I missed something) I don't know the Ember version an app is using from within the addon.

@lukemelia
Copy link
Contributor

@rwjblue Also found that ember-cli was missing the treeForAddonTemplates hook, which is where we would need to customize. Added it here: ember-cli/ember-cli#4159

@lukemelia
Copy link
Contributor

Working on a fix here: #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants