mirror of
https://github.com/fluffos/fluffos
synced 2026-08-12 18:26:06 -04:00
Every local build regenerated grammar.autogen.cc/.h and lexer.autogen.cc
and copied them back into the source tree, churning git whenever the
host's bison/flex emitted cosmetically different output than whatever
produced the committed copy. The existing normalization only tokenized
paths and header guards; it could not help when two generators that even
REPORT the same version (3.8.2) differ in emitted code (the committed
grammar had a distro-patched bison's "int yynerrs YY_ATTRIBUTE_UNUSED;"
that vanilla 3.8.2 downgrades on every rebuild).
Two-layer fix:
- Version pin: the committed generated files record the generator that
produced them ("made by GNU Bison X.Y.Z", YY_FLEX_*_VERSION). A host
with an OLDER generator no longer regenerates at all -- it builds from
the committed copy via the existing pre-generated path. Hosts at/above
the pin still regenerate, so CI keeps validating grammar.y/lexer.l
against a real toolchain.
- Input-hash gate: the post-build copy-back stamps the committed file
with the sha256 of its INPUT (grammar.y / lexer.l) and is skipped
entirely while that hash is unchanged. Generator differences alone can
no longer touch the committed files; editing the .y/.l still updates
them exactly as before.
Also: the copy-back now skips writing byte-identical content, so it no
longer bumps mtimes and cascades pointless relinks on every build.
The three committed autogen files are re-stamped in this commit (one-time
churn) as the new pinned baseline: bison 3.8.2 / flex 2.6.4, matching
every CI image.
Claude-Session: https://claude.ai/code/session_01PCUi8QKaFxeTyLXMeVkqn4
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| Findjemalloc.cmake | ||
| FindLibevent.cmake | ||
| FindMySQL.cmake | ||
| FindPCRE.cmake | ||
| FindPostgreSQL.cmake | ||
| FindSQLite3.cmake | ||
| helper.cmake | ||
| util.cmake | ||