refactor(ngcc): rework undecorated parent migration (#33362)

Previously, the (currently disabled) undecorated parent migration in
ngcc would produce errors when a base class could not be determined
statically or when a class extends from a class in another package. This
is not ideal, as it would cause the library to fail compilation without
a workaround, whereas those problems are not guaranteed to cause issues.

Additionally, inheritance chains were not handled. This commit reworks
the migration to address these limitations.

PR Close #33362
This commit is contained in:
JoostK
2019-10-20 23:28:00 +02:00
committed by Andrew Kushnir
parent 3858b26211
commit 2e5e1dd5f5
4 changed files with 135 additions and 53 deletions

View File

@ -75,17 +75,6 @@ export enum ErrorCode {
*/
NGCC_MIGRATION_DECORATOR_INJECTION_ERROR = 7001,
/**
* Raised when ngcc tries to decorate a base class that was imported from outside the package.
*/
NGCC_MIGRATION_EXTERNAL_BASE_CLASS = 7002,
/**
* Raised when ngcc tries to migrate a class that is extended from a dynamic base class
* expression.
*/
NGCC_MIGRATION_DYNAMIC_BASE_CLASS = 7003,
/**
* An element name failed validation against the DOM schema.
*/