-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Deprecate using tracked in classic classes #728
Conversation
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 seems like a good thing to deprecate, but I'd rather see the deprecation be until
5.0 not 4.0.
@rwjblue waiting until 5.0 would lock us into having to provide a shim around Does the alternative of exposing |
Is this really unused? I seem to remember us using it, though I would have to check to be really sure. It also seems somewhat arbitrary to fall off a cliff on this particular feature and this feature only, I think we got a lot of millage out of the flexibility and simplicity of the decoupled migration model. It also breaks the general expectations about decorators in the framework (on this particular decorator only). If it’s just about not loosing out on a good naming, this seems like too heavy-handed to me. Certainly there would be other just as good options like I am also not sure if it’s actually a fundamentally good idea to overload this to mean two pretty different things. We did it with |
@chancancode I believe this is an orthogonal point of discussion. Whether or not we decide to use |
I don't think this is correct? The definition of what the "invoke" does here (e.g. non-decorator use case) could absolutely be provided by |
That's a good point. It would be unfortunate to have to tie Ember in that way I think, specifically for a to-be-deprecated feature (classic classes), but it would work to solve that issue. |
Does that mean that this will work: import Component from "@ember/component";
class ClassicComponent extends Component {
@tracked foo;
} Or by |
@boris-petrov that would work! This would only deprecating using the classic syntax, any classic classes that work as native classes would continue to work with |
Sounds like a good idea! My gut feeling is that this is indeed rarely used, so the churn cost should be pretty low. Especially if Speaking for our app, we've still got a good deal of classic components. We're gradually migrating, when we have other reasons to refactor code we'll rewrite with glimmer plus angle brackets and tracked. Just my view though, others may have another perspective. |
The classic syntax is indeed heavily used by many apps I've encountered, most commonly when migrating a very large app when the native class codemod cannot yet be run. It seems to be a transient middle state although a very useful one: the native class codemod doesn't take a lot of apps very far until they've cleaned up certain other patterns that can take some time, and many codemods were written to only mod classic syntax to better classic syntax patterns prior to moving to native classes so these teams wait to run the native class codemod until they've completed this other work. I don't know that i agree with overloading the signature but from the perspective of whether the classic syntax is used think the deprecation until should be the same as for classic syntax as many of these mid-migration apps are on latest Ember versions. Folks don't always upgrade right away and it would suck for there to be a mismatch here where they needed to downgrade or pin at an ember version because classic still worked but tracked on classic didn't. |
Well this was not part of 4.0. Is the only thing blocking the version we do it in? |
@wagenet I think so |
@chriskrycho would you think this falls under #832 or is it separate? |
Roughly: classic classes themselves will go away. We could remove this earlier than those, though, so please do include it in that list! |
I’ll add this to the #832 list but also leave it open for now. |
This fell off my radar until I was doing a triage pass, but it pairs nicely with #876; I'm going to bring it to Framework this week. For good or for ill, it looks like it's going to end up targeting 6.0, since we are now in the 4.10 beta cycle and we freeze deprecations at the |
We talked about this today at Framework, and rather than pushing this direction (and deprecating things piecemeal) we are going to FCP to close—by getting rid of it holistically as part of what we're discussing around Classic on #832. |
Rendered