Skip to content

fix(@ngtools/webpack): HTML and style changes in libraries is not ref… #15146

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

Closed
wants to merge 1 commit into from
Closed

fix(@ngtools/webpack): HTML and style changes in libraries is not ref… #15146

wants to merge 1 commit into from

Conversation

alan-agius4
Copy link
Collaborator

…lected in applications during VE AOT

During AOT compilations, apart from the d.ts and .js changes we need to handle summary changes and metadata depedencies for libraries.

NGC compiler doesn't allow us to purge known changed summaries, this change implements a workaround for this, which allows us to have incrementality for component resources in libraries.

Fixes #13588

@alan-agius4 alan-agius4 requested a review from filipesilva July 23, 2019 12:58
@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Jul 23, 2019
@alan-agius4 alan-agius4 marked this pull request as ready for review July 23, 2019 12:58
…lected in applications during VE AOT

During AOT compilations, apart from the `d.ts` and `.js` changes we need to handle summary changes and metadata depedencies for libraries.

NGC compiler doesn't allow us to purge known changed summaries, this change implements a workaround for this, which allows us to have incrementality for component resources in libraries.

Fixes #13588
@alan-agius4 alan-agius4 requested review from filipesilva and removed request for filipesilva July 24, 2019 19:04
it('rebuilds AOT works with library HTML and CSS changes', async () => {
// DISABLED_FOR_IVY - Not yet supported under Ivy
if (ivyEnabled) {
pending('Not supported in Ivy');
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this not supported or just not relevant? I imagine it should just work. If it does, we should test it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It’s not supported because ngcc is non incremental. This should eventually work when we have dev libs in ivy mode.

// Note: NGTSC program doesn't implement 'getLibrarySummaries' method.
const originalGetLibrarySummaries = oldProgram.getLibrarySummaries;

oldProgram.getLibrarySummaries = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel a bit concerned with this workaround. It looks like the sort of thing that should be addressed in the VE compiler. @kara where do you think this should be addressed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably, let's see what @kara thinks.

@alan-agius4
Copy link
Collaborator Author

See: #17736 (comment)

@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 Jun 18, 2020
@alan-agius4 alan-agius4 deleted the aot-library-compilation branch October 19, 2020 15:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Html changes not detected in watched library by "ng serve --aot"
4 participants