-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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 bug removing a component from an NgModule during an incremental build #34912
Conversation
dd15a75
to
1546e1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but ci is unhappy (leftover debugger
)
This commit fixes a bug in the incremental rebuild engine of ngtsc, where if a component was removed from its NgModule, it would not be properly re-emitted. The bug stemmed from the fact that whether to emit a file was a decision based purely on the updated dependency graph, which captures the dependency structure of the rebuild program. This graph has no edge from the component to its former module (as it was removed, of course), so the compiler erroneously decides not to emit the component. The bug here is that the compiler does know, from the previous dependency graph, that the component file has logically changed, since its previous dependency (the module file) has changed. This information was not carried forward into the set of files which need to be emitted, because it was assumed that the updated dependency graph was a more accurate source of that information. With this commit, the set of files which need emit is pre-populated with the set of logically changed files, to cover edge cases like this. Fixes angular#34813
It was erroneously committed to src/.
1546e1f
to
228d9b3
Compare
…34912) This commit fixes a bug in the incremental rebuild engine of ngtsc, where if a component was removed from its NgModule, it would not be properly re-emitted. The bug stemmed from the fact that whether to emit a file was a decision based purely on the updated dependency graph, which captures the dependency structure of the rebuild program. This graph has no edge from the component to its former module (as it was removed, of course), so the compiler erroneously decides not to emit the component. The bug here is that the compiler does know, from the previous dependency graph, that the component file has logically changed, since its previous dependency (the module file) has changed. This information was not carried forward into the set of files which need to be emitted, because it was assumed that the updated dependency graph was a more accurate source of that information. With this commit, the set of files which need emit is pre-populated with the set of logically changed files, to cover edge cases like this. Fixes #34813 PR Close #34912
…ngular#34912) This commit fixes a bug in the incremental rebuild engine of ngtsc, where if a component was removed from its NgModule, it would not be properly re-emitted. The bug stemmed from the fact that whether to emit a file was a decision based purely on the updated dependency graph, which captures the dependency structure of the rebuild program. This graph has no edge from the component to its former module (as it was removed, of course), so the compiler erroneously decides not to emit the component. The bug here is that the compiler does know, from the previous dependency graph, that the component file has logically changed, since its previous dependency (the module file) has changed. This information was not carried forward into the set of files which need to be emitted, because it was assumed that the updated dependency graph was a more accurate source of that information. With this commit, the set of files which need emit is pre-populated with the set of logically changed files, to cover edge cases like this. Fixes angular#34813 PR Close angular#34912
…on (angular#34912) It was erroneously committed to src/. PR Close angular#34912
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.