Skip to content
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

Support Angular Version 11 #6046

Closed
highestop opened this issue Nov 12, 2020 · 15 comments
Closed

Support Angular Version 11 #6046

highestop opened this issue Nov 12, 2020 · 15 comments
Milestone

Comments

@highestop
Copy link

highestop commented Nov 12, 2020

What problem does this feature solve?

Version 11 of Angular now available, see https://blog.angular.io/version-11-of-angular-now-available-74721b7952f7

What does the proposed API look like?

null

@highestop highestop changed the title support latest Angular Version 11 Support Angular Version 11 Nov 16, 2020
@gemron
Copy link

gemron commented Nov 19, 2020

angular 11 compile and hmr is so quickly,waiting nz-zorro-antd upgrade .

@vthinkxie
Copy link
Member

Hi, we expect to support angular 11 by the end of December, there still some work needs to be done.

@hsuanxyz hsuanxyz added this to the v11.0.0 milestone Nov 19, 2020
@John0King
Copy link

with the angular version policy we discussed a few month ago, that v.11.0.x should simply compile with angular 11 without feature update. and v11.1.x or v11.2.x should contains feature update, but now angular 11 published 1 month ago , and there still no version support it. I'm wonder is the policy changed ?

@vthinkxie
Copy link
Member

vthinkxie commented Dec 16, 2020

with the angular version policy we discussed a few month ago, that v.11.0.x should simply compile with angular 11 without feature update. and v11.1.x or v11.2.x should contains feature update, but now angular 11 published 1 month ago , and there still no version support it. I'm wonder is the policy changed ?

ng-zorro-antd strictly follows Semantic Versioning 2.0.0.

I believe there no one who want to bring break changes in 11.0.x which is previous compatible in 11.0.0

MAJOR version when you make incompatible API changes.

https://ng.ant.design/docs/changelog/en

check here for more details https://semver.org/

@pburgmer
Copy link
Contributor

@vthinkxie

Does an update to Angular 11 cause braking changes in ng-zorro? Why not releasing an ng-zorro 10.x version that supports Angular 11? As far as I know semantic versioning does not require you to bump the major version for a major release of your dependencies.
I would love to have a version compatible to Angular 11 with just the features of ng-zorro 10.

@vthinkxie
Copy link
Member

vthinkxie commented Dec 18, 2020

Hi @pburgmer
we want to keep the major version the same as angular, which is a common practice in the angular lib community.
By the way, if you want to use ng-zorro-antd v10 with angular v11, it should work except not tested officially

@junekpavel
Copy link

Hi @vthinkxie,

I understand that it's quite common to keep major version with Angular. But in my opinion it is't such a good practice to combine it with Semantic Versioning.

The main issue in there is that ng-zorro is blocking ability to update application to new Angular version for a very long time. Let me try to explain.

When new Angular version is released, usually some of APIs are deprecated. So we all have to change source code to reflect new APIs. It could be a lot of changes sometimes, that take a lot of time to realize. But we can't complete the upgrade, because we need to wait for all libraries to be updated as well.

But when library (ng-zorro in this case) releases version with new Angular support along with bunch of own major changes (deprecations, APIs changes, styles changes ...) it takes much more afford to realize the upgrade. Because in that case you don't only have to reflect Angular changes but the library changes too.

Or, the other real world example... you want (or even need) to keep up with Angular, but don't want to upgrade the library at all (eg. when CSS styles are changed or some API you're using are removed). (For example, when we upgraded to Angular 9, we had to modify many CSS because of ng-zorro 9.)

Would't it be better to release minor versions that supports new Angular version without waiting to major release? Could you please at least consider pros and cons of this suggestion before you threw it away?

We really like and appreciate all work you are doing in ng-zorro, it's truly amazing, but this approach towards releases makes upgrading to new Angular quite complicated for us.

@pburgmer
Copy link
Contributor

@vthinkxie thanks for your feedback.
I know it is common practice but I see some problems with this approach. It reduces maintenance effort on the library side but as @junekpavel pointed out it put the effort and the constraints on the user of your library.

@vthinkxie
Copy link
Member

vthinkxie commented Dec 18, 2020

Hi, @junekpavel thanks for your comment

There is a discussion about this before, ng-zorro-antd depends on both angular and ant design spec.

Both of them could have break changes, to keep Semantic Versioning, we have to align both of the versions.

For example

ant design spec 3.0 + angular 8.0 = ng-zorro-antd 8.0

Then angular 9.0 released

There are some break changes from angular 8.0 to 9.0, what ng-zorro-antd version should be then?

8.x is obviously incorrect since there are break changes introduced by angular(which will also cause break changes in our lib).

But if we publish ng-zorro-antd 9.0 depends on ant design spec 3.x and angular 9.0, which version should we use when applying ant design spec 4.0 published one month later?

There are also some break changes in our lib as planned, such as nzTitle replaced with nzTooltipTitle, which usually could not just be finished when angular new version released.

We have to take all of them into consideration, and the most important is we don't have enough bandwidth to keep too many major versions. the current release plan is we keep the major version with angular as well as keep semantic versioning.

Hope this would answer your question.

@vthinkxie
Copy link
Member

vthinkxie commented Dec 18, 2020

@vthinkxie thanks for your feedback.
I know it is common practice but I see some problems with this approach. It reduces maintenance effort on the library side but as @junekpavel pointed out it put the effort and the constraints on the user of your library.

Yes, but we don't have enough bandwidth to keep too many major versions since all contributors here are volunteers and ng-zorro-antd is not a commercial project. Reduces maintenance effort on the library is important to us.

If there are more contributors, we can even take LTS into consideration, but it is not possible in our current situation.

@pburgmer
Copy link
Contributor

@vthinkxie I didn't know that all contributors are volunteers. Thought ng-zorro is developed by Alibaba. Thank you for the explanation.

@junekpavel
Copy link

Thank you @vthinkxie for you reply and pointing out ant design spec dependency. I totally understand that versioning is as good as it could be right now.


May I have (hope simple) suggestion about Angular updates?

As you mentioned

ng-zorro-antd v10 with angular v11, it should work except not tested officially

What about to have new Angular versions supported "unofficially"? I have an example.

With Angular 9, the usage of ModuleWithProviders without an explicitly generic type was deprecated. Since this doesn't require much effort to fix, it could be modified and released via minor version of ng-zorro 8. So although major version is kept on 8 (and ng-zorro is running on Angular 8 as well), it's also compatible (at least partially) with Angular 9.

This is't applicable for all changes of course, but for simple (minor) changes that doesn't require any public APIs modifications it could work like a charm.

@vthinkxie
Copy link
Member

vthinkxie commented Dec 18, 2020

@vthinkxie I didn't know that all contributors are volunteers. Thought ng-zorro is developed by Alibaba. Thank you for the explanation.

Contributors come from different companies like Alibaba, Tencent, ThoughtWorks, Sangfor, and so on

Yes, some of us come from Alibaba, but it is still an MIT opensource project, all contributions here won't be counted as our OKR or KPI :)

@vthinkxie
Copy link
Member

Thank you @vthinkxie for you reply and pointing out ant design spec dependency. I totally understand that versioning is as good as it could be right now.

May I have (hope simple) suggestion about Angular updates?

As you mentioned

ng-zorro-antd v10 with angular v11, it should work except not tested officially

What about to have new Angular versions supported "unofficially"? I have an example.

With Angular 9, the usage of ModuleWithProviders without an explicitly generic type was deprecated. Since this doesn't require much effort to fix, it could be modified and released via minor version of ng-zorro 8. So although major version is kept on 8 (and ng-zorro is running on Angular 8 as well), it's also compatible (at least partially) with Angular 9.

This is't applicable for all changes of course, but for simple (minor) changes that doesn't require any public APIs modifications it could work like a charm.

We will try to implement such fixes on the previous version before step into the next version in the future, appreciate your advice.

@vthinkxie
Copy link
Member

vthinkxie commented Dec 22, 2020

Hi all, we just released ng-zorro-antd v11 to support angular 11, thanks to all the contributors!

release note here: https://github.com/NG-ZORRO/ng-zorro-antd/releases/tag/11.0.0

upgrade guide here: #6217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants