Skip to content

Fix time macro include digest#2741

Open
fallintoplace wants to merge 1 commit into
mozilla:mainfrom
fallintoplace:fix/preprocessor-cache-time-macro-digest
Open

Fix time macro include digest#2741
fallintoplace wants to merge 1 commit into
mozilla:mainfrom
fallintoplace:fix/preprocessor-cache-time-macro-digest

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

  • stop passing the cached result key into include validation
  • seed the normalized time-macro include digest from the include-file digest
  • add a regression test for __TIMESTAMP__ include digest updates

Why

The time-macro path reused a variable named digest from result_matches, but that value was the cached result key, not the include file digest. Timestamp metadata updates could therefore store a digest derived from the wrong input.

Testing

  • cargo fmt --check
  • cargo test -q compiler::preprocessor_cache::test::test_preprocessor_cache_timestamp_digest_uses_include_file_digest --lib
  • cargo test -q compiler::preprocessor_cache --lib
  • cargo test -q --lib

@codecov-commenter

codecov-commenter commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.62%. Comparing base (bdbab18) to head (2f0cdf8).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/preprocessor_cache.rs 83.33% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2741      +/-   ##
==========================================
+ Coverage   74.56%   74.62%   +0.05%     
==========================================
  Files          70       70              
  Lines       39795    39833      +38     
==========================================
+ Hits        29675    29725      +50     
+ Misses      10120    10108      -12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants