-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
bug(CdkTable): CdkTable constructor parameters changed in a patch version #20422
Comments
Looks like an oversight. We do allow constructor changes in patch versions, but the new parameters have to be optional. |
Hi @crisbeto, thanks for the quick response :) |
We'll push some changes to turn it into an optional parameter. It may be easier to wait with upgrading so you don't have to deal with multiple breaking changes. |
In angular#19964 and angular#19750 some breaking constructor changes were made which eventually got released as a part of a patch branch which doesn't follow our breaking changes policy. These changes make the new constructor parameters optional and add fallbacks to the old behavior. Fixes angular#20422.
In angular#19964 and angular#19750 some breaking constructor changes were made which eventually got released as a part of a patch branch which doesn't follow our breaking changes policy. These changes make the new constructor parameters optional and add fallbacks to the old behavior. Fixes angular#20422.
In angular#19964 and angular#19750 some breaking constructor changes were made which eventually got released as a part of a patch branch which doesn't follow our breaking changes policy. These changes make the new constructor parameters optional and add fallbacks to the old behavior. Fixes angular#20422.
In angular#19964 and angular#19750 some breaking constructor changes were made which eventually got released as a part of a patch branch which doesn't follow our breaking changes policy. These changes make the new constructor parameters optional and add fallbacks to the old behavior. Fixes angular#20422.
In angular#19964 and angular#19750 some breaking constructor changes were made which eventually got released as a part of a patch branch which doesn't follow our breaking changes policy. These changes make the new constructor parameters optional and add fallbacks to the old behavior. Fixes angular#20422.
In angular#19964 and angular#19750 some breaking constructor changes were made which eventually got released as a part of a patch branch which doesn't follow our breaking changes policy. These changes make the new constructor parameters optional and add fallbacks to the old behavior. Fixes angular#20422.
In angular#19964 and angular#19750 some breaking constructor changes were made which eventually got released as a part of a patch branch which doesn't follow our breaking changes policy. These changes make the new constructor parameters optional and add fallbacks to the old behavior. Fixes angular#20422.
In angular#19964 and angular#19750 some breaking constructor changes were made which eventually got released as a part of a patch branch which doesn't follow our breaking changes policy. These changes make the new constructor parameters optional and add fallbacks to the old behavior. Fixes angular#20422.
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. |
In angular#19964 and angular#19750 some breaking constructor changes were made which eventually got released as a part of a patch branch which doesn't follow our breaking changes policy. These changes make the new constructor parameters optional and add fallbacks to the old behavior. Fixes angular#20422.
The constructor parameters of CdkTable changed in version 10.1.2 (see: 10.1.1...10.1.2#diff-86c33ad9a24e48674baaf250f4035a11).
This issue might be not considered a bug if we do not assume CDK components API is something that should conform semver versioning.
However, in my opinion, parameters of a public constructor should be rather treated as a part of the public API. Especially for a CDK, which is meant to be used and extended by others. Thus such a breaking change should be done in major versions only according to the semver standard.
The particular breaking change:
71a2a17#diff-86c33ad9a24e48674baaf250f4035a11R430
The change causes our Barista library to fail the compilation. However, I've originally spotted the problem during development of our product that uses the Barista lib and it was much more cumbersome, because there was no compilation error - the library was already prebuilt and the only error that we got was a runtime one (both Jest and browser):
As far as I researched, a similar issue was closed: #20308, however Angular 10.0.10 doesn't seem to solve this specific issue.
Reproduction
Real world reproduction example:
npm install && npm run build
The build should pass fine.
@angular/cdk
dependencyIt can be easily reproduced with a Stackblitz example as well. Please, let me know if you'd like that. Although, I don't think it's necessary - the issue can be easily spotted even with a static analysis.
Expected Behavior
Patch version should not contain API breaking changes.
Actual Behavior
The constructor parameter change causes compilation errors in the library using the CDK directly, and runtime errors for projects using it indirectly by a precompiled dependency.
Environment
The text was updated successfully, but these errors were encountered: