Skip to content

fix(ivy): identify all ESM5 decorated classes - #27848

Closed
petebacondarwin wants to merge 1 commit into
angular:masterfrom
petebacondarwin:ngcc-find-esm5-decorated-classes
Closed

petebacondarwin wants to merge 1 commit into
angular:masterfrom
petebacondarwin:ngcc-find-esm5-decorated-classes

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Dec 27, 2018 •

Copy link
Copy Markdown
Contributor

TODO:

  • Fix up the commit message.

Fixes #27841

@petebacondarwin petebacondarwin added type: bug/fix state: WIP effort1: hours freq2: medium area: core Issues related to the framework runtime target: major This PR is targeted for the next major release comp: ivy risk: low labels Dec 27, 2018
@ngbot ngbot Bot added this to the Backlog milestone Dec 27, 2018
@mary-poppins

Copy link
Copy Markdown

You can preview 1598e41 at https://pr27848-1598e41.ngbuilds.io/.

@petebacondarwin
petebacondarwin force-pushed the ngcc-find-esm5-decorated-classes branch from 1598e41 to e87a297 Compare December 27, 2018 22:08
@mary-poppins

Copy link
Copy Markdown

You can preview e87a297 at https://pr27848-e87a297.ngbuilds.io/.

@petebacondarwin
petebacondarwin force-pushed the ngcc-find-esm5-decorated-classes branch from e87a297 to da9bacf Compare December 28, 2018 08:29
@mary-poppins

Copy link
Copy Markdown

You can preview da9bacf at https://pr27848-da9bacf.ngbuilds.io/.

@petebacondarwin petebacondarwin changed the title fix(ivy): WIP fix(ivy): identify all ESM5 decorated classes Dec 29, 2018
@petebacondarwin petebacondarwin added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Dec 29, 2018
@petebacondarwin
petebacondarwin force-pushed the ngcc-find-esm5-decorated-classes branch from da9bacf to 40f2886 Compare December 29, 2018 14:37
@mary-poppins

Copy link
Copy Markdown

You can preview 40f2886 at https://pr27848-40f2886.ngbuilds.io/.

@alan-agius4

Copy link
Copy Markdown
Contributor

Can confirm that this fixes both #27841 and #27794

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isAssignmentStatement has now gone unused it seems.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used in Esm5ReflectionHost.

In ESM5 decorated classes can be indicated by calls to `__decorate()`.
Previously the `ReflectionHost.findDecoratedClasses()` call would identify
helper calls of the form:

```
SomeClass = tslib_1.__decorate(...);
```

But it was missing calls of the form:

```
SomeClass = SomeClass_1 = tslib_1.__decorate(...);
```

This form is common in `@NgModule()` decorations, where the class
being decorated is referenced inside the decorator or another
member.

This commit now ensures that a chain of assignments, of any length,
is now identified as a class decoration if it results in a call to
`__decorate()`.

Fixes angular#27841
@petebacondarwin
petebacondarwin force-pushed the ngcc-find-esm5-decorated-classes branch from 40f2886 to d09190a Compare January 11, 2019 15:23
@petebacondarwin
petebacondarwin requested review from a team January 11, 2019 15:23
@mary-poppins

Copy link
Copy Markdown

You can preview d09190a at https://pr27848-d09190a.ngbuilds.io/.

@petebacondarwin petebacondarwin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 11, 2019
@petebacondarwin
petebacondarwin deleted the ngcc-find-esm5-decorated-classes branch January 11, 2019 20:38
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 area: core Issues related to the framework runtime cla: yes effort1: hours freq2: medium risk: low 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.

ngcc not running on all files (ESM5)

6 participants