-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix: workaround for es2015 inheritance not always working #13834
fix: workaround for es2015 inheritance not always working #13834
Conversation
Since the inherited `ctorParameters` can be either a static array or a function that returns an array, the workaround that landed with e9103a6 does not fully solve the issue, which developers experience when using Angular Material with ES2015. This improves the workaround and ensures that it handles both scenarios properly. Also the workaround has been moved into a separate function in order to remove code duplication. This should also make it easier to delete the workaround if we need to.
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.
LGTM
…gular#13834)" This reverts commit a22a9fa. This change caused a new issue where Closure Compiler was not able to do dead-code elimination due to the function call with unknown side effects.
) Since the inherited `ctorParameters` can be either a static array or a function that returns an array, the workaround that landed with e9103a6 does not fully solve the issue, which developers experience when using Angular Material with ES2015. This improves the workaround and ensures that it handles both scenarios properly. Also the workaround has been moved into a separate function in order to remove code duplication. This should also make it easier to delete the workaround if we need to.
…gular#13834)" (angular#13868) This reverts commit a22a9fa. This change caused a new issue where Closure Compiler was not able to do dead-code elimination due to the function call with unknown side effects.
Since the inherited `ctorParameters` can be either a static array or a function that returns an array, the workaround that landed with e9103a6 does not fully solve the issue, which developers experience when using Angular Material with ES2015. This improves the workaround and ensures that it handles both scenarios properly. Also the workaround has been moved into a separate function in order to remove code duplication. This should also make it easier to delete the workaround if we need to.
Thanks for this @devversion !!! Just got everything upgraded to the latest 7.x releases(material, angular core, and flex-layout). Sadly running es5 due to flex-layout pending upgrade but still happy to be upgraded. Nice to see everything loading on latest versions :) I know this was a lot of work on your end. |
Hi @epelc, thanks for the feedback. Unfortunately we had to revert the latest workaround again because it broke Google closure compiler, so Material should no longer work with ES2015 latest version. We basically delegated the issue to angular/angular#27267 |
@devversion unfortunate but good to know! At least I'm back on es5 for now with the help of |
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. |
Since the inherited
ctorParameters
can be either a static array or a function that returns an array, the workaround that landed with e9103a6 does not fully solve the issue which developers experience when using Angular Material with ES2015. This improves the workaround and ensures that it handles both scenarios properly.Also the workaround has been moved into a separate function in order to remove code duplication. This should also make it easier to delete the workaround if we need to.
See #12760 for more details about the whole issues.
Note: I've tested thoroughly and went through the reflection capabilities of
@angular/core
. This should finally resolve the issue completely and it's just a matter of time until the issue is fixed upstream (there are various issues filed; see referenced issues in #12760)Thanks to @epelc for finding this.