Skip to content

Specialized error when depending on an Ivy-compiled NgModule, 10.2.x edition#41598

Closed
alxhub wants to merge 1 commit into
angular:10.2.xfrom
alxhub:ngc/ivy-ngmodule-error-10.2.x
Closed

Specialized error when depending on an Ivy-compiled NgModule, 10.2.x edition#41598
alxhub wants to merge 1 commit into
angular:10.2.xfrom
alxhub:ngc/ivy-ngmodule-error-10.2.x

Conversation

@alxhub

@alxhub alxhub commented Apr 13, 2021

Copy link
Copy Markdown
Member

No description provided.

…lar#41534)

When an Ivy NgModule is imported into a View Engine build, it doesn't have
metadata.json files that describe it as an NgModule, so it appears to VE
builds as a plain, undecorated class. The error message shown in this
situation generic and confusing, since it recommends adding an @NgModule
annotation to a class from a library.

This commit adds special detection into the View Engine compiler to give a
more specific error message when an Ivy NgModule is imported.

PR Close angular#41534
@google-cla google-cla Bot added the cla: yes label Apr 13, 2021
@alxhub alxhub requested a review from AndrewKushnir April 13, 2021 17:00
@pullapprove pullapprove Bot requested review from IgorMinar, atscott and jelbourn April 13, 2021 17:00
@pullapprove pullapprove Bot requested a review from petebacondarwin April 13, 2021 17:06

@AndrewKushnir AndrewKushnir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed-for: public-api

(though I think that may not be needed, since it's a backport)

@zarend zarend added the area: compiler Issues related to `ngc`, Angular's template compiler label Apr 13, 2021
@ngbot ngbot Bot added this to the Backlog milestone Apr 13, 2021
@alxhub alxhub added target: patch This PR is targeted for the next patch release merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Apr 13, 2021
@ngbot ngbot Bot added the action: merge The PR is ready for merge by the caretaker label Apr 13, 2021
@alxhub

alxhub commented Apr 13, 2021

Copy link
Copy Markdown
Member Author

Caretaker: this is a backport of #41534 to the 10.2.x branch.

@zarend zarend added target: lts This PR is targeting a version currently in long-term support and removed target: patch This PR is targeted for the next patch release labels Apr 13, 2021
@zarend

zarend commented Apr 13, 2021

Copy link
Copy Markdown
Contributor

@josephperrott what's the processes for merging into the previous major version? Would I merge this like normal using yarn ng-dev pr merge, and when do we release 10.2.x?

@josephperrott

Copy link
Copy Markdown
Member

@zarend The merge tooling supports merging as normal into active LTS branches with the target: lts label.

@jelbourn jelbourn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Reviewed-for: public-api

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed-for: public-api

@zarend

zarend commented Apr 14, 2021

Copy link
Copy Markdown
Contributor

Closed by commit f630f33

@zarend zarend closed this Apr 14, 2021
zarend pushed a commit that referenced this pull request Apr 14, 2021
…) (#41598)

When an Ivy NgModule is imported into a View Engine build, it doesn't have
metadata.json files that describe it as an NgModule, so it appears to VE
builds as a plain, undecorated class. The error message shown in this
situation generic and confusing, since it recommends adding an @NgModule
annotation to a class from a library.

This commit adds special detection into the View Engine compiler to give a
more specific error message when an Ivy NgModule is imported.

PR Close #41534

PR Close #41598
@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 May 15, 2021
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 area: compiler Issues related to `ngc`, Angular's template compiler cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: lts This PR is targeting a version currently in long-term support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants