Emit per-target status in build-graph.json and re-emit on transitions#529
Draft
ChrisonSimtian wants to merge 1 commit into
Draft
Emit per-target status in build-graph.json and re-emit on transitions#529ChrisonSimtian wants to merge 1 commit into
ChrisonSimtian wants to merge 1 commit into
Conversation
Adds a `status` field to each target in build-graph.json and re-writes the file on every target state transition, so editor tooling watching it can animate a run live (queued → running → succeeded/failed) — the producer half of the live run graph. - BuildGraphUtility projects ExecutionStatus onto the graph control's vocabulary (scheduled→queued, running, succeeded, failed/aborted→failed, skipped). Neutral states (none/notrun/collective) emit null, so a structural or --plan snapshot stays unstyled and only a real run paints the nodes. - SerializeBuildGraphAttribute captures the targets at init and now also handles IOnTargetRunning/Succeeded/Failed/Skipped, re-emitting the graph (with the executor's in-place status updates) on each. Still best-effort — a write failure never fails the build; the write is locked. - Additive and backwards-compatible: a consumer that predates the field ignores the extra key, so it stays schema v1 (guarded by a test). Verified: unit tests cover the status projection; dogfooding `./build.ps1 Clean` emits build-graph.json with Clean=succeeded and the rest null. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The producer half of the live run graph:
build-graph.jsonnow carries per-targetstatusand is re-written on every target transition, so editor tooling (the VS Code extension) can watch the file and animate a run live — queued → running → succeeded/failed.BuildGraphUtilityprojectsExecutionStatusonto the control's vocabulary (scheduled→queued,running,succeeded,failed/aborted→failed,skipped). Neutral states (none/notrun/collective) emitnull, so a structural or--plansnapshot stays unstyled — only a real run paints the nodes.SerializeBuildGraphAttributecaptures the targets at init and now also implementsIOnTargetRunning/Succeeded/Failed/Skipped, re-emitting on each (the executor updatestarget.Statusin place before firing the hook). Best-effort, locked write — never fails the build.Additive / non-breaking: a consumer predating the field ignores the extra key, so it stays schema v1 (guarded by a test).
Verified: unit tests cover the status projection (
scheduled→queued, neutral→null, etc.); dogfooding./build.ps1 Cleanemitsbuild-graph.jsonwithClean=succeededand everything elsenull.Independent of the graph-control PRs — it just widens the JSON contract. The consumer side (the control's
mountLive+ the extension's file-watcher) animates this automatically.