No description
Find a file
Stephen Dennis 0a934a7d78 build(ragel): guard date_scan and strip #line from the remaining outputs (#2029)
Two remainders from #2025.

## date_scan.cpp was unguarded

hooks/pre-commit knew about four Ragel outputs; mux/lib/date_scan.cpp was
absent from GENERATED_GENS entirely, so it could be hand-edited and
committed without its .rl and nothing objected -- while being listed in
docs/generated-files.md and shipped via unix/TOC.patchable. Added to all
three parallel arrays, which now hold 27 each.

Verified by alignment rather than by count: equal lengths prove nothing
about correspondence, so the check confirms every ragel triple's basenames
match and its rule lives in the same directory as its output. Then
exercised: staging date_scan.cpp alone is now blocked, naming date_scan.rl
as its source.

## Six more outputs carried #line

#2025's scope was right for what the mux build regenerates and dounix.sh
ships, but these have live rules of their own and could still dirty a tree:

  testcases/tools/unformat.c    28    testcases/tools/Makefile  (%.c: %.rl)
  testcases/tools/reformat.c    23    same
  ragel/trigger_match.c         16    ragel/Makefile
  tools/ansify/ansify.c         19    tools/ansify/Makefile  (make regen)
  client/tf/src/script_lex.cpp  67    client/tf/CMakeLists.txt
  client/tf/src/input_lex.cpp   62    same

The issue reported "no rule found" for trigger_match.c and ansify.c. Both
were wrong: ragel/Makefile:25 generates trigger_match.c on dependency, and
tools/ansify/Makefile has an explicit `regen` target. Neither is inert --
ansify's is opt-in rather than implicit, which is why it reads as absent.

Each regenerated through its OWN rule rather than by running sed by hand,
so the rule is what is under test. All six are idempotent across a second
regeneration, and the diffs are 215 deletions, every one a #line, nothing
added.

ragel/color_ops.c is generated from the same ../mux/lib/color_ops.rl as the
shipped copy but is not tracked, so it could not dirty anything; its rule
gets the strip anyway, so the two generations of one source cannot disagree
if it is ever checked in.

client/tf could not be built here -- src/regex_utils.h needs pcre2.h, which
is not on that target's include path on macOS -- but that is a pre-existing
gap unrelated to this change. The Ragel custom commands themselves DID run
(cmake configure succeeds once NCURSESW_LIB is pointed at a macOS ncurses),
and both outputs came back stripped, so the CMake edit is exercised rather
than assumed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 00:59:11 -06:00
client build(ragel): guard date_scan and strip #line from the remaining outputs (#2029) 2026-08-04 00:59:11 -06:00
color Color: Add CIELAB nearest-neighbor tool and YUV comparison 2026-03-16 11:20:08 -06:00
debian Retire ISSUES.md trackers; migrate open items to GitHub issues 2026-06-04 20:14:00 -05:00
docker Retire ISSUES.md trackers; migrate open items to GitHub issues 2026-06-04 20:14:00 -05:00
docs Add tools/ansify: MUX percent-color to ANSI (Ragel → C) 2026-08-01 17:12:16 -06:00
hooks build(ragel): guard date_scan and strip #line from the remaining outputs (#2029) 2026-08-04 00:59:11 -06:00
mux fix(net): contain exceptions on the accept branch of run_main_loop (#2018) 2026-08-03 23:36:02 -06:00
parser Retire ISSUES.md trackers; migrate open items to GitHub issues 2026-06-04 20:14:00 -05:00
ragel build(ragel): guard date_scan and strip #line from the remaining outputs (#2029) 2026-08-04 00:59:11 -06:00
sgp Remove hardtabs. 2012-05-18 13:29:49 -07:00
specs Add clean target to specs Makefile. 2010-06-02 20:34:17 -07:00
testcases build(ragel): guard date_scan and strip #line from the remaining outputs (#2029) 2026-08-04 00:59:11 -06:00
tests Merge master into test/color-ops-blob-differential 2026-08-03 20:35:52 -06:00
tools build(ragel): guard date_scan and strip #line from the remaining outputs (#2029) 2026-08-04 00:59:11 -06:00
unix build(release): the win32 source zip has never built; fix the TOC conflicts and validate the lists 2026-08-02 21:03:08 -06:00
utf Regenerate UTF-8 DFA tables; fix table-gen toolchain on macOS 2026-06-04 12:32:08 -05:00
win32 build(release): drop four inherited orphans from the win32 source list 2026-08-02 21:22:38 -06:00
.editorconfig build: remove the 11 UTF-8 BOMs, and stop editors re-adding them (#1499) 2026-07-26 21:20:02 -06:00
.gitattributes test(perf): PerfSmokeWin — ETW CPU-sampling analog of PerfSmoke (#1920 W1) 2026-07-31 22:50:46 -06:00
.gitignore test(build): track header dependencies in the standalone harnesses (#1952) 2026-08-02 00:06:02 -06:00
AGENTS.md Add tools/ansify: MUX percent-color to ANSI (Ragel → C) 2026-08-01 17:12:16 -06:00
CLAUDE.md docs: correct CHANGES claims invalidated by ten upstream merges 2026-08-02 16:05:42 -06:00
CONTRIBUTING.md docs: add CONTRIBUTING.md — contribution workflow and standards 2026-07-12 16:26:54 -06:00
dounix.sh build(release): the win32 source zip has never built; fix the TOC conflicts and validate the lists 2026-08-02 21:03:08 -06:00
dowin32.sh build(release): the win32 source zip has never built; fix the TOC conflicts and validate the lists 2026-08-02 21:03:08 -06:00
GEMINI.md Add AGENTS.md, GEMINI.md and clean up .gitignore 2026-03-08 20:33:27 -06:00
LICENSE Add top-level LICENSE file (Artistic-1.0 + revised TinyMUD notice) 2026-06-30 07:26:10 -08:00
Makefile Merge master into test/color-ops-blob-differential 2026-08-03 20:35:52 -06:00