Want Build System: Version 2 [WIP]
- Zig 92.5%
- SourcePawn 4.7%
- C 1.6%
- JavaScript 0.5%
- CSS 0.3%
- Other 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Review follow-ups: - Mycelium values are embedded in their canonical packed form, never decomposed into JSON objects: a job_done outcome value is the 68-byte myc.asBytes(myc.AnyValue) encoding (no struct padding), a spawned event's input is the same AnyValue encoding, and `task` is the canonical packed sys.Task bytes (op followed by the input, 100 bytes: std.mem.asBytes' padded 112-byte layout would leak trailing padding into the stream). - Replay trees are loaded into the sweep's arena: System.loadJob and Job.initDone now take the allocator that owns the restored tree, and Job.deinit returns children storage through it. The reporter passes the sweep arena, so every producer tree loaded while emitting a sweep is reclaimed in one arena deinit after its events went out to stdout; Job.deinit still closes the restored scratch dirs on the way. - Event payloads stay stack references (task/input/result slices alias locals in the emit functions); only the dedup maps outlive a sweep. cmd: add --json to build/build-git, replaying cached job trees `want build --json` and `want build-git --json` replace the tty job tree with JSON Lines on stdout: one jsonout.Event per line (job_spawned/job_queued/job_running/job_done), tagged unions written as a single field naming the variant, with a reference client (readEvent) that rejects invalid unions. Events are derived from the timestamps the job system records and the reporter's final sweep emits every transition the polls missed, so a build that finished before the first poll still produces the full sequence. A job whose result came from the task cache links its producer (job_done.outcome.ok.cached_from: the producer's fqid and transition times) and the reporter replays the producer's recorded subtree from the state dir, so a warm build that changed nothing still emits the complete event tree of the run that did the work. Spawned events carry the job's parent relation (parent fqid plus the child's handle). Supporting sys changes: - Jobs persist a `done` record (transition times, limits, outcome) into their scratch dir at finish; Job.initDone loads it and System.loadJob restores any job's recorded tree for the replay. - The parent's on-disk `children` file is now the handle table: Job.spawn writes the child's record at handle*record_size in the same critical section as the in-memory append, and initDone restores handles from the record offsets, so a skipped child cannot shift its siblings' handles. _spawn no longer read-modify-writes the file (also dropping its 256-child cap) and no longer blocks on the parent dir under system.lock. Under --json, stdout stays parseable JSONL: importer progress, std.log, and a failed build's log dump go to stderr. |
||
| build | ||
| doc | ||
| etc | ||
| example | ||
| src | ||
| stdlib | ||
| tool | ||
| vendor | ||
| www | ||
| .gitignore | ||
| .wantignore | ||
| build.zig | ||
| build.zig.zon | ||
| DESIGN.md | ||
| DEV.md | ||
| SKILL.md | ||
| WANT | ||
| want.sh | ||
| WoW.md | ||