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

feat: Avoid touching wrapper files when content is unchanged #242

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

breezewish
Copy link
Contributor

Fix #239

This PR simply adds a check for most wrapper writes: Try to read first, then write if the content should be changed.

Verified that ccache works across different builds for rust-rocksdb with the default config:

ccache --set-config=compiler_check=mtime # Default
[2024-04-16T13:44:19.059926 67945] Succeeded getting cached result
[2024-04-16T13:44:19.059943 67945] Result: direct_cache_hit
[2024-04-16T13:44:19.059944 67945] Result: local_storage_hit
[2024-04-16T13:44:19.059945 67945] Result: local_storage_read_hit
[2024-04-16T13:44:19.059946 67945] Result: local_storage_read_hit

Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@messense
Copy link
Member

CI failures with zig master or Rust nightly is fine, we'll deal with it when new zig/Rust release is out.

@messense messense enabled auto-merge (squash) April 16, 2024 05:55
@messense messense merged commit f1a5e6a into rust-cross:main Apr 16, 2024
33 of 39 checks passed
@breezewish breezewish deleted the write-untouched branch April 16, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ccache is always invalidated
2 participants