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

[heft] Update file copy layer to support incremental disk cache #4943

Merged
merged 6 commits into from
Sep 28, 2024

Conversation

dmichon-msft
Copy link
Contributor

Summary

Fixes #4942

Updates the underlying logic in Heft's copy-files-plugin to write an incremental cache file, that will be used to only copy files where the inputs have changed. This also impacts the file copy in heft-typescript-plugin.

Adds a new API to read and write incremental cache files, for use by other plugins.

Details

Incremental cache files store a config hash, a list of input files with SHA-256 hashes, and optionally a mapping from output file names to indices of input files.

Each task will get its own unique file-copy.json cache file in the task's temp folder if there are a non-zero number of copy operations configured for the task.

How it was tested

Using build-tests/heft-copy-files-plugin.

Impacted documentation

Copy files.

@dmichon-msft dmichon-msft merged commit 48e0497 into microsoft:main Sep 28, 2024
4 checks passed
@dmichon-msft dmichon-msft deleted the copy-file-if-changed branch September 28, 2024 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

[heft] CopyFilesPlugin should only write files if the contents are different
2 participants