Skip to content

fix(ivy): prevent unknown element check for AOT-compiled components - #34024

Closed
AndrewKushnir wants to merge 2 commits into
angular:masterfrom
AndrewKushnir:FW-1736_unknown_element_check_jit
Closed

AndrewKushnir wants to merge 2 commits into
angular:masterfrom
AndrewKushnir:FW-1736_unknown_element_check_jit

Conversation

@AndrewKushnir

@AndrewKushnir AndrewKushnir commented Nov 24, 2019 •

Copy link
Copy Markdown
Contributor

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

@AndrewKushnir

Copy link
Copy Markdown
Contributor Author

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

Comment thread packages/core/src/render3/jit/module.ts Resolved
@AndrewKushnir AndrewKushnir added target: patch This PR is targeted for the next patch release type: bug/fix and removed state: WIP labels Nov 25, 2019
@AndrewKushnir
AndrewKushnir marked this pull request as ready for review November 25, 2019 18:35
@AndrewKushnir
AndrewKushnir requested review from a team November 25, 2019 18:36
@AndrewKushnir AndrewKushnir added the action: review The PR is still awaiting reviews from at least one requested reviewer label Nov 25, 2019

@crisbeto crisbeto left a comment

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.

LGTM

@AndrewKushnir

AndrewKushnir commented Nov 25, 2019 •

Copy link
Copy Markdown
Contributor Author

@AndrewKushnir AndrewKushnir added the action: presubmit The PR is in need of a google3 presubmit label Nov 25, 2019
@kara
kara self-requested a review November 25, 2019 23:21
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 FW-1736_unknown_element_check_jit branch from e956bf9 to a7fdeae Compare November 27, 2019 01:31
@AndrewKushnir AndrewKushnir removed the action: presubmit The PR is in need of a google3 presubmit label Nov 27, 2019
@kara
kara removed their request for review November 27, 2019 20:39
@mhevery mhevery 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 Nov 27, 2019
mhevery pushed 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
@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 Dec 28, 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 cla: yes target: patch This PR is targeted for the next patch release type: bug/fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(ivy): runtime error for unknown element even with NO_ERRORS_SCHEMA

6 participants