-
Notifications
You must be signed in to change notification settings - Fork 190
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
[cleanup]: Remove this.
property fallback (e.g. the this-property-fallback
deprecation)
#1331
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<tr class={{if @item.selected "danger"}}> | ||
<td class="col-md-1">{{@item.id}}</td> | ||
<td class="col-md-4"><a {{on "click" onSelect}}>{{@item.label}}</a></td> | ||
<td class="col-md-4"><a {{on "click" this.onSelect}}>{{@item.label}}</a></td> | ||
<td class="col-md-1"><a><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a></td> | ||
<td class="col-md-6"></td> | ||
</tr> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ import { isGetFreeHelper } from '../opcode-builder/helpers/resolution'; | |
import { SimpleArgs } from '../opcode-builder/helpers/shared'; | ||
import { Call, CallDynamic, Curry, PushPrimitiveReference } from '../opcode-builder/helpers/vm'; | ||
import { Compilers, PushExpressionOp } from './compilers'; | ||
import { DEBUG } from '@glimmer/env'; | ||
|
||
export const EXPRESSIONS = new Compilers<PushExpressionOp, ExpressionSexpOpcode>(); | ||
|
||
|
@@ -57,23 +56,7 @@ EXPRESSIONS.add(SexpOpcodes.GetStrictFree, (op, [, sym, _path]) => { | |
}); | ||
}); | ||
|
||
EXPRESSIONS.add(SexpOpcodes.GetFreeAsFallback, (op, [, freeVar, path]) => { | ||
op(HighLevelResolutionOpcode.ResolveLocal, freeVar, (name: string, moduleName: string) => { | ||
if (DEBUG) { | ||
let propertyPath = path ? [name, ...path].join('.') : name; | ||
|
||
deprecate( | ||
`The \`${propertyPath}\` property path was used in the \`${moduleName}\` template without using \`this\`. This fallback behavior has been deprecated, all properties must be looked up on \`this\` when used in the template: {{this.${propertyPath}}}`, | ||
false, | ||
{ | ||
id: 'this-property-fallback', | ||
} | ||
); | ||
} | ||
|
||
op(Op.GetVariable, 0); | ||
op(Op.GetProperty, name); | ||
}); | ||
EXPRESSIONS.add(SexpOpcodes.GetFreeAsFallback, (op, [, , path]) => { | ||
withPath(op, path); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this whole thing be ✂️? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't tell if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @snewcomer - Let's land this as is now, and maybe you can send a follow up PR that removes the |
||
|
||
|
@@ -93,19 +76,6 @@ EXPRESSIONS.add(SexpOpcodes.GetFreeAsHelperHeadOrThisFallback, (op, expr) => { | |
ifHelper: (handle: number) => { | ||
Call(op, handle, null, null); | ||
}, | ||
|
||
ifFallback: (name: string, moduleName: string) => { | ||
deprecate( | ||
`The \`${name}\` property was used in the \`${moduleName}\` template without using \`this\`. This fallback behavior has been deprecated, all properties must be looked up on \`this\` when used in the template: {{this.${name}}}`, | ||
false, | ||
{ | ||
id: 'this-property-fallback', | ||
} | ||
); | ||
|
||
op(Op.GetVariable, 0); | ||
op(Op.GetProperty, name); | ||
}, | ||
}); | ||
}); | ||
}); | ||
|
@@ -140,19 +110,6 @@ EXPRESSIONS.add(SexpOpcodes.GetFreeAsDeprecatedHelperHeadOrThisFallback, (op, ex | |
|
||
Call(op, handle, null, null); | ||
}, | ||
|
||
ifFallback: (name: string, moduleName: string) => { | ||
deprecate( | ||
`The \`${name}\` property was used in the \`${moduleName}\` template without using \`this\`. This fallback behavior has been deprecated, all properties must be looked up on \`this\` when used in the template: {{this.${name}}}`, | ||
false, | ||
{ | ||
id: 'this-property-fallback', | ||
} | ||
); | ||
|
||
op(Op.GetVariable, 0); | ||
op(Op.GetProperty, name); | ||
}, | ||
}); | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is different behavior. Not sure if technically a regression though. Neither
this.[]
northis['']
work.