Skip to content

preprocessor cache: compare time-macro headers by content - #2954

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

lenamonj wants to merge 1 commit into
mozilla:mainfrom
lenamonj:preprocessor-cache-time-macro-digest

Conversation

@lenamonj

Copy link
Copy Markdown

With ignore_time_macros off, a header containing __DATE__ or __TIMESTAMP__ is never compared by content on lookup, so a same-size edit to it is served the old object: result_matches skips the digest check once a time macro is found. The input file's __TIMESTAMP__ is not in the entry key either.

Now every file is remembered, checked and keyed by its content digest plus the date for __DATE__ and its mtime for __TIMESTAMP__. Files with neither keep their plain digest, so existing entries stay valid. Lookups no longer rewrite entries.

#2741 reseeds the time-macro digest and #2940 caches it; both keep the skip and serve these edits stale.

Three new tests fail with the fix undone and pass with it.

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.

1 participant