Skip to content

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Feb 16, 2019

PR Checklist

PR Type

  • Bugfix

What is the current behavior?

ngtsc detects class inheritance in a way that only works in TS or ES2015 code. As a result, inheritance will not be detected for code in ES5 format, such as when running ngtsc through ngcc to transform old-style Angular code to ivy format.

Related issue: #28643

What is the new behavior?

This PR fixes the issue by delegating class inheritance detection to the current ReflectionHost, which is able to correctly interpret the used code format.

Does this PR introduce a breaking change?

  • Yes
  • No

@gkalpak gkalpak requested a review from a team as a code owner February 16, 2019 14:47
@gkalpak gkalpak force-pushed the fix-ivy-class-inheritance-in-ngcc branch 2 times, most recently from aa0a29d to 7421f24 Compare February 16, 2019 14:48
@gkalpak gkalpak added type: bug/fix action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release comp: ivy labels Feb 16, 2019
@ngbot ngbot bot modified the milestone: needsTriage Feb 16, 2019
@gkalpak gkalpak mentioned this pull request Feb 16, 2019
16 tasks
Previously, `ngtsc` detected class inheritance in a way that only worked
in TS or ES2015 code. As a result, inheritance would not be detected for
code in ES5 format, such as when running `ngtsc` through `ngcc` to
transform old-style Angular code to ivy format.

This commit fixes it by delegating class inheritance detection to the
current `ReflectionHost`, which is able to correctly interpret the used
code format.
@gkalpak gkalpak force-pushed the fix-ivy-class-inheritance-in-ngcc branch from 7421f24 to f1c1c7e Compare February 16, 2019 15:27
@mhevery mhevery closed this in 6b511a3 Feb 17, 2019
@gkalpak gkalpak deleted the fix-ivy-class-inheritance-in-ngcc branch February 17, 2019 07:30
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: major This PR is targeted for the next major release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants