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): exclude outputPath from persistent build cache key #21286

Merged
merged 1 commit into from
Jul 14, 2021
Merged

fix(@angular-devkit/build-angular): exclude outputPath from persistent build cache key #21286

merged 1 commit into from
Jul 14, 2021

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Jul 5, 2021

With this change we exclude outputPath from cache key due to i18n extraction which causes it to change on every build

const tempPath = fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), 'angular-cli-i18n-'));
buildOptions.outputPath = tempPath;

Closes #21275

@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Jul 5, 2021
@google-cla google-cla bot added the cla: yes label Jul 5, 2021
@alan-agius4 alan-agius4 requested a review from clydin July 5, 2021 16:43
@terencehonles
Copy link

LGTM, thanks @alan-agius4! Definitely looking forward to the speed boost I saw due to caching 🙂. I'm assuming anything cached wouldn't be stored in the outputPath so it's safe to remove before and then after the run like you did.

@terencehonles
Copy link

@clydin friendly ping about the review (I assume it needs to come from you not me). I'd definitely like to see this in the next patch version if possible 🙂

@alan-agius4 alan-agius4 changed the title fix(@angular-devkit/build-angular): generate consistent temp outputPath when using i18n inlining fix(@angular-devkit/build-angular): exclude outputPath from persistent build cache key Jul 13, 2021
@alan-agius4 alan-agius4 requested a review from clydin July 13, 2021 15:07
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Jul 13, 2021
@josephperrott josephperrott merged commit 1be3b07 into angular:master Jul 14, 2021
@alan-agius4 alan-agius4 deleted the persistent-cache branch July 14, 2021 20:14
@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 Aug 14, 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 target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NG_PERSISTENT_BUILD_CACHE breaks when localizing
5 participants