Repository navigation
Commit 025fb7d
committed
unit(u5a): the guardedWrite tool on top of the writer's guard API
Second unit of the #1914 split plan recorded on #1991: src/core/tools/guardedWrite.ts and its
spec, taken unchanged from 74f5eb2, plus the one knip.json line that declares
core/tools/guardedWrite.ts as a src workspace entry.
Builds on vps2f-1914-u5b for two measured reasons. The tool's only dependency on the
previous unit is Task's cancellationGeneration field, which guardedWrite reads at six
sites; a variant carrying the writer and the tool but not Task fails tsc with eight TS2339
errors for that property (built and measured as vps2f-1914-u5c, not kept). The unit also
cannot precede the writer for the opposite reason: knip --production does not credit imports
from files it reports as unused, so a writer-only unit has to declare the writer as an entry
instead, which is the line the previous unit carries. Taking the entry line here rather than
there is what makes both units pass knip in isolation, which matters because knip is a
required status check on main.
Local build for measurement. The unit's line counts, gate results, and the reason the entry
line moves between the two units are reported with this unit's head rather than inferred.1 parent 8a9d5b7 commit 025fb7d
3 files changed
Lines changed: 2000 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 19 | + | |
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
| |||
0 commit comments