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
Hi there! I've run into a few cases where I receive the following error while attempting to upgrade to using native classes that extend from Ability:
global failure: Error: You defined the class ExampleAbility that extends from Ember.Object using native class syntax, but you didn't mark it with the @classic decorator. All user classes that extend from this class must be marked as @classic, since they use classic features. If you want to remove the @classic decorator, you must remove the base class. For components, you can do this by converting to Glimmer components. For plain classes that extend from EmberObject, you can convert them into plain native classes that do not extend from EmberObject. If this class is a base class provided by the framework that you should be allowed to remove @classic from, please open an issue on the classic decorators repo: https://github.com/emberjs/ember-classic-decorator
One scenario I've been able to track down that has seemed to cause this is:
Having a native class A that extends from Ability
Having a component B that uses a can helper for A in its handlebars
Having a component C that wraps component B (think of something like C being a dropdown and B being an item for example)
Having a tracked property within component C
Removing the @tracked annotation from the property from component C in that scenario will allow for extending from Ability with no issues. I can work on trying to get a minimal reproducer if that is helpful here.
I've noticed that #151 removes the dependency on EmberObject from Ability which I imagine should resolve this issue without requiring the @classic decorator. Is this pull request still being actively worked on? Would be great to be able to use native class syntax without requiring the decorator.
Thanks in advance for the help. Let me know if I can provide any further information!
The text was updated successfully, but these errors were encountered:
Hi there! I've run into a few cases where I receive the following error while attempting to upgrade to using native classes that extend from
Ability
:One scenario I've been able to track down that has seemed to cause this is:
A
that extends fromAbility
B
that uses acan
helper forA
in its handlebarsC
that wraps componentB
(think of something likeC
being a dropdown andB
being an item for example)C
Removing the
@tracked
annotation from the property from componentC
in that scenario will allow for extending fromAbility
with no issues. I can work on trying to get a minimal reproducer if that is helpful here.I've noticed that #151 removes the dependency on
EmberObject
fromAbility
which I imagine should resolve this issue without requiring the@classic
decorator. Is this pull request still being actively worked on? Would be great to be able to use native class syntax without requiring the decorator.Thanks in advance for the help. Let me know if I can provide any further information!
The text was updated successfully, but these errors were encountered: