Skip to content

Fix preprocessor cache include validation#2740

Open
fallintoplace wants to merge 1 commit into
mozilla:mainfrom
fallintoplace:fix/preprocessor-cache-include-validation
Open

Fix preprocessor cache include validation#2740
fallintoplace wants to merge 1 commit into
mozilla:mainfrom
fallintoplace:fix/preprocessor-cache-include-validation

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

  • keep validating cached includes after the first match when ignore_time_macros is enabled
  • add a regression test where the first header is unchanged and a same-size second header changes

Why

The old control flow returned immediately after hashing the first include in the ignore_time_macros path. If a later include changed, the preprocessor cache could still accept the stale result.

Testing

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

@sylvestre

Copy link
Copy Markdown
Collaborator

@fallintoplace in the future, don't bother adding "Testing" in comment #0, it doesn't add value for us
thanks

@codecov-commenter

codecov-commenter commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.60%. Comparing base (bdbab18) to head (268196e).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2740      +/-   ##
==========================================
+ Coverage   74.56%   74.60%   +0.03%     
==========================================
  Files          70       70              
  Lines       39795    39840      +45     
==========================================
+ Hits        29675    29724      +49     
+ Misses      10120    10116       -4     

☔ 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.

3 participants