emberjs / ember.js

Ember.js - A JavaScript framework for creating ambitious web applications
https://emberjs.com
MIT License
22.47k stars 4.21k forks source link

local variables should always win over helper #17121

Closed chancancode closed 6 years ago

chancancode commented 6 years ago

We tried to fix this in #14520, but apparently we didn't catch all the cases.

Reproduction: https://ember-twiddle.com/dcce0cd429ceb1d454d62988937bfd15?openFiles=templates.application.hbs%2C

Options are:

  1. just fix it
  2. error for one cycle then fix
  3. deprecate for one LTS cycle then fix
rwjblue commented 6 years ago

IMHO, this is clearly a bug and we should just fix it (Option 1).

chancancode commented 6 years ago

imo, these are also bugs but in the sub-expression positions, but that's probably more controversial: https://ember-twiddle.com/95790479cef1d910bdc12ffcfc446149?openFiles=templates.application.hbs%2C (cc @wycats @mmun)

chancancode commented 6 years ago

Not sure if the approach is still good for the current glimmer codebase, but here was the last patch that fixed the {{foo}} cases: https://github.com/glimmerjs/glimmer-vm/pull/335

mmun commented 6 years ago

👍 from me. I agree with all the statements in the second twiddle.