Skip to content
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(engine): bug introduced that breaks circular on proto chain #505

Merged
merged 1 commit into from
Jul 13, 2018

Conversation

caridy
Copy link
Contributor

@caridy caridy commented Jul 13, 2018

Details

I broke this one a week ago when changing the detection of circular references.

Does this PR introduce a breaking change?

  • No

@@ -96,7 +96,7 @@ const CtorToDefMap: WeakMap<any, ComponentDef> = new WeakMap();

function getCtorProto(Ctor: any): any {
const proto = getPrototypeOf(Ctor);
return isCircularModuleDependency(Ctor) ? resolveCircularModuleDependency(proto) : proto;
return isCircularModuleDependency(proto) ? resolveCircularModuleDependency(proto) : proto;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nobody saw the issue in the review :( and it was pretty clear that this was wrong.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps it's worth adding comments here why the resolution works as it is or at least moving the method comments from resolveCircularModuleDependency function here, so that the developer can have a bigger picture on the prototype is retrieved.

Copy link
Contributor

@diervo diervo Jul 13, 2018

Choose a reason for hiding this comment

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

@caridy It was a review of dozens of files and million changes...

Copy link
Collaborator

@apapko apapko left a comment

Choose a reason for hiding this comment

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

I'm in the middle of verifying this in aura.

@diervo diervo merged commit b8287f1 into master Jul 13, 2018
@diervo diervo deleted the caridy/fix-circular-ref branch July 13, 2018 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants