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

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

Closed
wants to merge 1 commit into from

Conversation

alxhub
Copy link
Member

@alxhub alxhub commented Apr 13, 2021

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
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

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
Copy link
Member Author

alxhub commented Apr 13, 2021

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
Copy link
Contributor

zarend commented Apr 13, 2021

@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
Member

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

Copy link
Member

@jelbourn jelbourn left a comment

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

Copy link
Member

@petebacondarwin petebacondarwin left a comment

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
Copy link
Contributor

zarend commented Apr 14, 2021

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

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.

None yet

6 participants