Skip to content

TS type/lint gate re-runs from scratch every time — no tsc --incremental / eslint --cache #213

Description

@yuyu04

Problem

The TypeScript gate commands carry no incremental/cache flags:

type: npx --no-install tsc --noEmit
lint: npx --no-install eslint .

So every clad check (and every pre-commit/pre-push hook) re-type-checks and re-lints the whole tree from scratch, even when nothing changed.

Measured (cladding's own repo)

cold warm re-run
tsc 2.7s 1.1s (--incremental)
eslint 2.5s 0.6s (--cache)

~3.4s saved per unchanged re-run — the local dev loop where these run repeatedly.

Proposed fix

tsc --noEmit --incremental (build-info file) + eslint --cache, both written under .cladding/cache/ (already gitignored, so a managed project's tree stays clean).

Sound, not a shortcut: verified that a newly-introduced type error is still caught with a stale build-info present (tsc --incremental rebuilds the affected program slice; eslint --cache keys on file+config hash).

Explicitly NOT in scope (unsound for a gate)

Test execution (~20s, the dominant cost) is the bigger target, but a gate must certify the whole tree — changed-files / test-selection would let a regression in an "unrelated" file slip through. Left alone. (A separate sound win exists: the suite runs twice — unit stage + coverage stage ≈ 9.5s — which is dedupable; filed separately.)

Implemented by F-bfe14aac.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions