fw-06 — Broader Ideas

Every framework is buying information

A compiler exists to obtain, at build time, facts the runtime cannot derive. That is the same trade as: types, prepared statements, database query plans, AOT compilation, and static site generation.

When a runtime is being conservative, ask what a build step could prove. That question is how compiler-first frameworks were invented, and it is available to you inside your own codebase — a codemod, a lint rule, or a generated manifest is a small compiler.

Silent correctness failures deserve special handling

A wrong patch flag or a wrong sideEffects declaration produces stale output with no error. That class of bug needs a different testing strategy from ordinary bugs: run the suite with optimisations on and off and compare — Chromium's virtual-test-suite idea (bi-13) applied to a compiler.

If you ship any build-time optimisation — bundler config, a codemod, a caching layer — this is the safety net that makes it responsible rather than brave.

Error messages are the interface

Caret-and-line versus a stack trace inside the compiler is the difference between five seconds and twenty minutes, and between adoption and distrust. Source ranges must be recorded from lexing onward, because you cannot recover information you did not capture.

If you build a DSL, config validator, or schema checker for your organisation, this determines whether anyone uses it. It is the most under-invested part of most internal tooling.

Next

fw-07 consumes the output and adds the graph-level concerns: splitting, shaking, and caching.