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(ivy): prevent unknown element check for AOT-compiled components #34024

Conversation

@AndrewKushnir
Copy link
Contributor

AndrewKushnir commented Nov 24, 2019

Prior to this commit, the unknown element can happen twice for AOT-compiled components: once during compilation and once again at runtime. Due to the fact that schemas information is not present on Component and NgModule defs after AOT compilation, the second check (at runtime) may fail, even though the same check was successful at compile time. This commit updates the code to avoid the second check for AOT-compiled components by checking whether schemas information is present in a logic that executes the unknown element check.

This PR resolves FW-1736.
Resolves #33976.

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No
@googlebot googlebot added the cla: yes label Nov 24, 2019
@ngbot ngbot bot added this to the needsTriage milestone Nov 24, 2019
@AndrewKushnir

This comment has been minimized.

Copy link
Contributor Author

AndrewKushnir commented Nov 24, 2019

@petebacondarwin @crisbeto could you please have a look at this draft PR (we discussed these changes offline) when you get a chance? Thank you.

@AndrewKushnir AndrewKushnir marked this pull request as ready for review Nov 25, 2019
@AndrewKushnir AndrewKushnir requested review from angular/fw-compiler as code owners Nov 25, 2019
Copy link
Member

crisbeto left a comment

LGTM

@AndrewKushnir

This comment has been minimized.

Copy link
Contributor Author

AndrewKushnir commented Nov 25, 2019

@kara kara self-requested a review Nov 25, 2019
Prior to this commit, the unknown element can happen twice for AOT-compiled components: once during compilation and once again at runtime. Due to the fact that `schemas` information is not present on Component and NgModule defs after AOT compilation, the second check (at runtime) may fail, even though the same check was successful at compile time. This commit updates the code to avoid the second check for AOT-compiled components by checking whether `schemas` information is present in a logic that executes the unknown element check.
@AndrewKushnir AndrewKushnir force-pushed the AndrewKushnir:FW-1736_unknown_element_check_jit branch from e956bf9 to a7fdeae Nov 27, 2019
@kara kara removed their request for review Nov 27, 2019
mhevery added a commit that referenced this pull request Nov 27, 2019
…34024)

Prior to this commit, the unknown element can happen twice for AOT-compiled components: once during compilation and once again at runtime. Due to the fact that `schemas` information is not present on Component and NgModule defs after AOT compilation, the second check (at runtime) may fail, even though the same check was successful at compile time. This commit updates the code to avoid the second check for AOT-compiled components by checking whether `schemas` information is present in a logic that executes the unknown element check.

PR Close #34024
@mhevery mhevery closed this in 658087b Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.