Fix three toolchain bugs found on the first real local run #1

Merged
joeyr merged 1 commit from fix/toolchain into main 2026-08-16 16:44:52 -05:00
Owner

The initial skeleton shipped with luacheck and Node uninstalled, so make lint, make bundle and make check-normalized had never run. All three were broken; two failed silently.

  • make lint checked zero files. luacheck expands a directory argument to *.lua, and every script here is *.ttslua — so luacheck lib games matched nothing and exited 0, indistinguishable from a clean run.
  • W131 on every TTS callback, once linting actually ran. unused_globals = false does not suppress it and dropping allow_defined_top only converts it to W111, so game sources ignore 131 explicitly.
  • make normalize / check-normalized exited 2 with no saves committed. The guard's exit 0 sat on its own recipe line and ended only that subshell.

The failing run on main is the third bug, and is the reason this PR exists.

Verified locally against luacheck 1.2.0_1 and Node 24: lint reads 3 files with 0 warnings, bundle-all resolves the require graph, check-normalized exits 0.

The initial skeleton shipped with luacheck and Node uninstalled, so `make lint`, `make bundle` and `make check-normalized` had never run. All three were broken; two failed silently. - **`make lint` checked zero files.** luacheck expands a directory argument to `*.lua`, and every script here is `*.ttslua` — so `luacheck lib games` matched nothing and exited 0, indistinguishable from a clean run. - **W131 on every TTS callback**, once linting actually ran. `unused_globals = false` does not suppress it and dropping `allow_defined_top` only converts it to W111, so game sources ignore 131 explicitly. - **`make normalize` / `check-normalized` exited 2 with no saves committed.** The guard's `exit 0` sat on its own recipe line and ended only that subshell. The failing run on `main` is the third bug, and is the reason this PR exists. Verified locally against luacheck 1.2.0_1 and Node 24: lint reads 3 files with 0 warnings, `bundle-all` resolves the require graph, `check-normalized` exits 0.
Fix three toolchain bugs found on the first real local run
All checks were successful
lint / lua (pull_request) Successful in 23s
7d52d8cb68
The initial skeleton shipped with luacheck and Node uninstalled, so make lint,
make bundle and make check-normalized had never been executed. All three were
broken, and two of them failed silently.

make lint checked zero files. Handed a directory, luacheck expands it to *.lua
only, and every script in this repo is *.ttslua -- so `luacheck lib games`
matched nothing and exited 0. That is indistinguishable from a clean run, which
is the worst way for a lint gate to fail. Now passes --include-files.

With linting actually running, every TTS event callback trips W131 "unused
global variable": handlers are defined at the top level and never read here,
because the caller is the game. unused_globals = false does not suppress this
-- it governs the globals list, not names allow_defined_top introduces -- and
dropping allow_defined_top only converts W131 into W111 on the same line. So
game sources ignore 131 explicitly. lib/ is deliberately not covered.

make normalize and make check-normalized exited 2 whenever no saves were
committed. The guard's `exit 0` sat on its own recipe line, so it ended only
that line's subshell; make then invoked the normalizer with an empty file list
and argparse rejected it. Since CI runs check-normalized last and the repo has
no saves, every push would have gone red.

Verified locally against luacheck 1.2.0_1 and Node 24: lint reads 3 files with
0 warnings, bundle-all resolves the require graph for every game, and
check-normalized reports no saves and exits 0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
joeyr merged commit 1d455a890f into main 2026-08-16 16:44:52 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
joeyr/tts-games!1
No description provided.