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

fix(@angular-devkit/build-angular): correctly extract messages when using cached build #22266

Merged
merged 2 commits into from
Dec 1, 2021
Merged

fix(@angular-devkit/build-angular): correctly extract messages when using cached build #22266

merged 2 commits into from
Dec 1, 2021

Conversation

alan-agius4
Copy link
Collaborator

Extracted messages are not part of Webpack pipeline and hence they cannot be retrieved from cache. Therefore, we need to mark the extraction loader as non cacheable.

Closes #22264

…sing cached build

Extracted messages are not part of Webpack pipeline and hence they cannot be retrieved from cache. Therefore, we need to mark the extraction loader as non cacheable.

Closes #22264
@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Dec 1, 2021
@google-cla google-cla bot added the cla: yes label Dec 1, 2021
@@ -21,6 +21,11 @@ export default function localizeExtractLoader(
content: string,
map: LoaderSourceMap,
) {
// This loader is not cacheable due to message extraction works.
// Extracted messages are not part of webpack pipeline and hence they cannot be retrieved from cache.
// TODO: We should investigate in the future on making this deterministic and more cacheable.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we file an issue or project about this? I'm always hesitant about TODO's in the code which tend to be forgotten about. Issues are more easily triaged, assignable, and actionable IMHO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

agreed

@alan-agius4 alan-agius4 added merge: squash commits When the PR is merged, a squash and merge should be performed action: merge The PR is ready for merge by the caretaker labels Dec 1, 2021
@dgp1130 dgp1130 merged commit 52c6c3d into angular:master Dec 1, 2021
dgp1130 pushed a commit that referenced this pull request Dec 1, 2021
…sing cached build (#22266)

* fix(@angular-devkit/build-angular): correctly extract messages when using cached build

Extracted messages are not part of Webpack pipeline and hence they cannot be retrieved from cache. Therefore, we need to mark the extraction loader as non cacheable.

Closes #22264

* fixup! fix(@angular-devkit/build-angular): correctly extract messages when using cached build

(cherry picked from commit 52c6c3d)
@alan-agius4 alan-agius4 deleted the i18n-cache-extraction branch December 1, 2021 21:55
@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 Jan 1, 2022
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 merge: squash commits When the PR is merged, a squash and merge should be performed target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty i18n messages if .angular dir exists
2 participants