-
Notifications
You must be signed in to change notification settings - Fork 25.5k
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
[DO NOT MERGE IN 2.x - 4.x only] refactor(hooks): change abstract classes for interfaces #12324
Conversation
ce18cc5
to
e14096a
Compare
Thanks for the PR:
|
1126bfc
to
93c413b
Compare
@vicb We can probably merge this into 4.0 branch |
Yes once:
|
93c413b
to
472ace8
Compare
@vicb done |
thanks ! |
I was about to merge this in but then realized that the breaking change is not properly documented (in terms of impact on the end users) and upon further digging in I realized that this is actually a bigger breaking change than what it look like. I'd like to have us take one more look at the impact of this change before we merge it in. I describe my concerns in this typescript snippet: https://goo.gl/sW8qLW |
I think u are underestimate your users :)
so we shouldn't change code because of a blog post? I think it's a dead end Plus in 2.3.1 angular added support for inheritance and using |
|
I think it is unlikely that people today are extending |
I spoke with @mhevery and @juleskremer and we agreed that Angular DevRel is going to review this, estimate impact and weigh in on this before we merge it in. The problem is that our promise to the community was that no changes in Angular 4 would break existing components. We don't know if any existing components that people depend on rely on "extends" rather than "implements" and if there are any that do, then people won't be able to use them if they are 3rd party components that they can't change. We promised to make the upgrade to A4 smooth and this change has a potential to make it not smooth, so we need to be cautions. DevRel will review this, and suggest the path forward for this change. Just to be clear, I think this is a good change, we just need to be careful about how we roll it out so that we don't break the Angular ecosystem and with that our promises to the community. |
is this something that tslint or codeylzer could pick up? |
@robwormald it could. it might be a good idea to roll that out now (specific to our hooks only) so that we start warning people about this now. But we still don't know how many projects are being covered by lint/codelyzer and how many of them will use the updated version before A4. |
what's so special with lifecycle hooks? For example, this #13785 pr will break all apps because every decent app uses OpaqueTokens when this pr will probably break <1% users. Just interesting. |
@DzmitryShylovich I pushed back on that one as well. We need to really understand the impact of these kinds of changes before merging them in. |
It will also decrease file size. |
@DzmitryShylovich can you please rebase this one? If things are looking good with the view engine, we'll attempt to land this PR. |
472ace8
to
665942b
Compare
BREAKING CHANGE: Because all lifecycle hooks are now interfaces the code that uses 'extends' keyword will no longer compile. To migrate the code follow the example below: Before: @component() class SomeComponent extends OnInit {} After: @component() class SomeComponent implements OnInit {} Closes angular#10083
665942b
to
3237d43
Compare
@IgorMinar done |
thanks @DzmitryShylovich |
BREAKING CHANGE: Because all lifecycle hooks are now interfaces the code that uses 'extends' keyword will no longer compile. To migrate the code follow the example below: Before: ``` @component() class SomeComponent extends OnInit {} ``` After: ``` @component() class SomeComponent implements OnInit {} ``` we don't expect anyone to be affected by this change. Closes angular#10083
BREAKING CHANGE: Because all lifecycle hooks are now interfaces the code that uses 'extends' keyword will no longer compile. To migrate the code follow the example below: Before: ``` @component() class SomeComponent extends OnInit {} ``` After: ``` @component() class SomeComponent implements OnInit {} ``` we don't expect anyone to be affected by this change. Closes angular#10083
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #10083