Run code generation on build - #64400
Wesley Wigham (weswigham) wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Watch reruns can bypass schema validations and mark stale generator output as current.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Runs code generation automatically before builds and during watch mode.
Changes:
- Adds generated-output metadata and schema reloading.
- Integrates generation into build, API, validation, watch, and release tasks.
- Adds watch-mode coverage and updates contributor guidance.
| File | Description |
|---|---|
Herebyfile.mjs |
Integrates generation with build and watch tasks. |
CONTRIBUTING.md |
Documents the revised workflow. |
tools/scripts/gen/generatedFile.test.mts |
Tests repeated watch generation. |
tools/scripts/tsc/schema.ts |
Supports schema reloading. |
tools/scripts/tsc/generate.ts |
Reloads schema before generation. |
tools/scripts/tsc/generate-ts-ast.ts |
Refreshes schema-derived state and exports outputs. |
tools/scripts/tsc/generate-go-ast.ts |
Exports generated output paths. |
tools/scripts/tsc/generate-enums.ts |
Exports enum output paths. |
tools/scripts/tsc/generate-encoder.ts |
Exports encoder output paths. |
tsc/internal/stringutil/_scripts/generate-unicode-data.mts |
Exports Unicode output paths. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
…in-proc codegen from watch targets
… all hereby task definition integration tests from generatedFile.test.mts
|
It's a bit of a tangent, but I also just went ahead and deleted all the tests in |

So that you never need to remember "oh, I changed X so need to regenerate Y" ever again.
Also fixes
build:watchto do code generation, too, if people are using that.