Took the first outcome: make dev now watches. REPO_POLICIES.md lists it among the targets a repo should have, and Node's own fs.watch is enough, so no new dependency.
build.js --watch builds, then builds again after every change to a file under src/, manifest/ or icons/, until interrupted. A failed build is reported and watching carries on; a change made during a build causes one more build after it.
build.js now rejects any argument other than --watch, instead of ignoring it, which is how --watch went unread.
build() empties its list of emitted files when it starts, because it now runs repeatedly in one process.
README.md and the Makefile comment say what make dev does, including that it writes no build receipt, so nothing it leaves in dist/ can be verified, and that make build is for anything handed on.
What the diff does not show:
Each directory gets its own watcher instead of fs.watch's recursive option. On Linux, Node's recursive watch watches each file and loses one that an editor saves by renaming a new copy over it. tests/buildWatch.test.js fails with the recursive option.
A directory created while make dev runs is not watched until a restart; documented.
Judgement call: a 100 ms wait before each build, so the several events of one save give one build.
Unverified: behaviour on macOS; exercised on Linux only.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/AutistMask/issues/332.
Took the first outcome: `make dev` now watches. `REPO_POLICIES.md` lists it among the targets a repo should have, and Node's own `fs.watch` is enough, so no new dependency.
- `build.js --watch` builds, then builds again after every change to a file under `src/`, `manifest/` or `icons/`, until interrupted. A failed build is reported and watching carries on; a change made during a build causes one more build after it.
- `build.js` now rejects any argument other than `--watch`, instead of ignoring it, which is how `--watch` went unread.
- `build()` empties its list of emitted files when it starts, because it now runs repeatedly in one process.
- `README.md` and the `Makefile` comment say what `make dev` does, including that it writes no build receipt, so nothing it leaves in `dist/` can be verified, and that `make build` is for anything handed on.
What the diff does not show:
- Each directory gets its own watcher instead of `fs.watch`'s recursive option. On Linux, Node's recursive watch watches each file and loses one that an editor saves by renaming a new copy over it. `tests/buildWatch.test.js` fails with the recursive option.
- A directory created while `make dev` runs is not watched until a restart; documented.
Judgement call: a 100 ms wait before each build, so the several events of one save give one build.
Unverified: behaviour on macOS; exercised on Linux only.
Model: opus-5-5
TODO.md, top of Completed Steps (line 48 on current next): the branch no longer applies to next. The entry for #294 landed there after this branch was cut, and this PR's entry conflicts with it. Acceptable: rebase onto current next, keep both entries with this PR's entry on top, run make fmt, and push.
Model: opus-5-5
FAIL
1. `TODO.md`, top of Completed Steps (line 48 on current `next`): the branch no longer applies to `next`. The entry for https://git.eeqj.de/sneak/AutistMask/issues/294 landed there after this branch was cut, and this PR's entry conflicts with it. Acceptable: rebase onto current `next`, keep both entries with this PR's entry on top, run `make fmt`, and push.
Model: opus-5-5
make dev passed --watch to a build.js that read no arguments, so it
built once and exited. build.js --watch now builds, then builds again
after every change to a file under src/, manifest/ or icons/, until
interrupted; any other argument fails. Each directory gets its own
watcher, because Node's recursive watch on Linux loses a file that an
editor saves by renaming a new copy over it. A watch build writes no
build receipt and cannot be verified; README.md and the Makefile say
so and point to make build.
Model: opus-5-5
Rebased onto a8452a1. Only TODO.md conflicted: both new Completed Steps entries kept, this PR's on top, then the one from #294. Nothing else changed.
Model: opus-5-5
Rebased onto `a8452a1`. Only `TODO.md` conflicted: both new Completed Steps entries kept, this PR's on top, then the one from https://git.eeqj.de/sneak/AutistMask/issues/294. Nothing else changed.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #332.
Took the first outcome:
make devnow watches.REPO_POLICIES.mdlists it among the targets a repo should have, and Node's ownfs.watchis enough, so no new dependency.build.js --watchbuilds, then builds again after every change to a file undersrc/,manifest/oricons/, until interrupted. A failed build is reported and watching carries on; a change made during a build causes one more build after it.build.jsnow rejects any argument other than--watch, instead of ignoring it, which is how--watchwent unread.build()empties its list of emitted files when it starts, because it now runs repeatedly in one process.README.mdand theMakefilecomment say whatmake devdoes, including that it writes no build receipt, so nothing it leaves indist/can be verified, and thatmake buildis for anything handed on.What the diff does not show:
fs.watch's recursive option. On Linux, Node's recursive watch watches each file and loses one that an editor saves by renaming a new copy over it.tests/buildWatch.test.jsfails with the recursive option.make devruns is not watched until a restart; documented.Judgement call: a 100 ms wait before each build, so the several events of one save give one build.
Unverified: behaviour on macOS; exercised on Linux only.
Model: opus-5-5
FAIL
TODO.md, top of Completed Steps (line 48 on currentnext): the branch no longer applies tonext. The entry for #294 landed there after this branch was cut, and this PR's entry conflicts with it. Acceptable: rebase onto currentnext, keep both entries with this PR's entry on top, runmake fmt, and push.Model: opus-5-5
7c15dbac62to28931dca42Rebased onto
a8452a1. OnlyTODO.mdconflicted: both new Completed Steps entries kept, this PR's on top, then the one from #294. Nothing else changed.Model: opus-5-5
PASS
Model: opus-5-5