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(ivy): handle aliased Angular decorators #29195
Conversation
Prior to this change the code didn't take into account the fact that decorators can be aliases while importing into a script. As a result, these decorators were not recognized by Angular and various failures happened because of that. Now we take aliases into account and resolve decorator name properly.
@@ -81,7 +81,7 @@ export class DecorationAnalyzer { | |||
importGraph = new ImportGraph(this.moduleResolver); | |||
cycleAnalyzer = new CycleAnalyzer(this.importGraph); | |||
handlers: DecoratorHandler<any, any>[] = [ | |||
new BaseDefDecoratorHandler(this.reflectionHost, this.evaluator), | |||
new BaseDefDecoratorHandler(this.reflectionHost, this.evaluator, this.isCore), |
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.
@@ -153,10 +153,23 @@ export function isAngularCore(decorator: Decorator): boolean { | |||
return decorator.import !== null && decorator.import.from === '@angular/core'; | |||
} | |||
|
|||
export function isAngularCoreReference(reference: Reference, symbolName: string) { | |||
export function isAngularCoreReference(reference: Reference, symbolName: string): boolean { |
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.
❤️
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.
👌
Caretaker: CI is green (including |
Prior to this change the code didn't take into account the fact that decorators can be aliases while importing into a script. As a result, these decorators were not recognized by Angular and various failures happened because of that. Now we take aliases into account and resolve decorator name properly. PR Close angular#29195
Prior to this change the code didn't take into account the fact that decorators can be aliases while importing into a script. As a result, these decorators were not recognized by Angular and various failures happened because of that. Now we take aliases into account and resolve decorator name properly. PR Close angular#29195
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. |
Prior to this change the code didn't take into account the fact that decorators can be aliases while importing into a script. As a result, these decorators were not recognized by Angular and various failures happened because of that. Now we take aliases into account and resolve decorator name properly.
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?