From 436a5ba6dba352b086454ab16771ab82da4b0f7a Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 24 Oct 2026 20:25:14 +0000 Subject: [PATCH] docs(codegen): codegen targets reconcile the tree when reached as a dependency Documents hephbuild/heph#398 (6c29673103cad3c3edb134e0dd1d0b5cfde970cc). Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_016ybuL1YrRKsHiVRjGNxksM --- website/docs/concepts/codegen.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/website/docs/concepts/codegen.md b/website/docs/concepts/codegen.md index df51a22..9b19b87 100644 --- a/website/docs/concepts/codegen.md +++ b/website/docs/concepts/codegen.md @@ -160,6 +160,14 @@ declares both a directory output and a file inside it is valid. Run `heph validate` in CI alongside `heph tool gen-gitignore` to ensure no two targets compete for the same part of the source tree. +## Reached through a dependency + +A codegen target updates the tree whenever it is part of the run — not only when +you name it. If `//app:bin` depends on `//fmt:generated`, running `//app:bin` +writes `fmt/generated.txt` too, and `--frozen` on a run that reaches a codegen +target verifies it the same way. The target is written once per run, however many +targets depend on it. + ## Verifying the tree in CI: `--frozen` Running a codegen target normally **writes** its outputs into the tree — `copy`