Skip to content

2026.9.29.5: a workspace's build programs are reused across selections, the build database plans by configuration, and a build reports each step once with its outcome while a status line states the build - #742

Merged
Sunrisepeak merged 5 commits into
mainfrom
fix/workspace-selection-stable-programs
Sep 29, 2026

Conversation

@speak-agent

@speak-agent speak-agent commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

The validation project's post-release run of 2026.9.29.4 showed five defects
in the commands around the workspace build (design document section 17.1).

  • D1: a member program's graph document listed every requester in the plan,
    the virtual root included, so the program's re-run key followed the
    selection and -p, pack and emit reran the programs a --workspace build ran.
    The document lists the requests made inside the program's closure
    (graph_package_entry takes the closure's packages).
  • The members' programs run dependencies first (depth-first over the plan's
    requests; a cycle skips its closing edge); they ran in discovery order.
  • D2: mcpp emit build-database and mcpp build --configure-only plan a
    workspace by configuration, each member's tests included
    (BuildOverrides::member_targets), so a package the members share is described
    once per configuration; members that are programs and their tests are
    described as such. A configuration whose plan fails is planned member by
    member, so a member's failure affects that member only. Set names carry a
    configuration prefix only in a document of several configurations; a set and
    a compile command (file and output) are described once (SPEC-005 v1.6).
  • A command that plans several configurations publishes the root
    compile_commands.json once, as the union of their databases; each
    configuration replaced it, a race under concurrent groups.
  • D3: the build program status lines name the package.
  • D4: a selected member is announced by its directory in a --workspace build.
  • D5: mcpp pack reports more than eight outputs by the entry each lies in
    below their common directory, with a count; --verbose and
    --message-format json name every output.
  • e2e 839, 840, 841; docs/07, docs/10, docs/30 in both languages; SPEC-005 v1.6;
    version 2026.9.29.5.

The cross-verification of this pull request then printed nothing for 40
minutes between the last Compiling line and Finished. The second commit
makes a build report each step once, with its outcome, and state the build
while it runs (.agents/docs/2026-09-29-build-progress-display-design.md):

  • ninja is read as it runs: its status lines give the counts, its log says
    which step finished and when, a step record beside build.ninja names each
    step's package, and the action wrapper reports a check or prepare action's
    start.
  • A package's line is written when every step of it has run (done <span>),
    or when the build ends; requested packages are listed, dependencies folded;
    --verbose lists everything and each step.
  • A build program has one line (ran, cached, failed).
  • A terminal shows the running lines and one status line below the output,
    e.g. Building 612/1203 · 14:32 · gpp.gui: vcpkg install 6:10; a log
    repeats the status line after a minute of silence.
  • A failed step is reported when it fails; Finished states the whole
    command's time and how it was spent.
  • Terminal detection on macOS and Windows; UTF-16 console output on Windows;
    mcpp.log's verbose records reach the terminal through mcpp.ui's writer.
  • e2e 842, 843; unit tests; docs/00, 09, 30, 40 in both languages.

Each new e2e fails on the published 2026.9.29.4 and passes here. Reviewed from the architecture, stability, compatibility, semantics, readability, simplicity, performance and cross-platform angles; the review's findings are addressed in this change.

Merged only after both gates pass: this pull request's CI, and the validation project's cross-verification with the mcpp built from this branch.

Refs #734.

…s and run dependencies first, the build database and --configure-only plan by configuration, and the output names what it reports

The validation project's post-release run of 2026.9.29.4 showed five defects
in the commands around the workspace build (design document section 17.1).

- D1: a member program's graph document listed every requester in the plan,
  the virtual root included, so the program's re-run key followed the
  selection and -p, pack and emit reran the programs a --workspace build ran.
  The document lists the requests made inside the program's closure
  (graph_package_entry takes the closure's packages).
- The members' programs run dependencies first (depth-first over the plan's
  requests; a cycle skips its closing edge); they ran in discovery order.
- D2: `mcpp emit build-database` and `mcpp build --configure-only` plan a
  workspace by configuration, each member's tests included
  (BuildOverrides::member_targets), so a package the members share is described
  once per configuration; members that are programs and their tests are
  described as such. A configuration whose plan fails is planned member by
  member, so a member's failure affects that member only. Set names carry a
  configuration prefix only in a document of several configurations; a set and
  a compile command (file and output) are described once (SPEC-005 v1.6).
- A command that plans several configurations publishes the root
  compile_commands.json once, as the union of their databases; each
  configuration replaced it, a race under concurrent groups.
- D3: the build program status lines name the package.
- D4: a selected member is announced by its directory in a --workspace build.
- D5: `mcpp pack` reports more than eight outputs by the entry each lies in
  below their common directory, with a count; --verbose and
  --message-format json name every output.
- e2e 839, 840, 841; docs/07, docs/10, docs/30 in both languages; SPEC-005 v1.6;
  version 2026.9.29.5.
Sunrisepeak added a commit to Sunrisepeak/GalTranslPP that referenced this pull request Sep 29, 2026
…munity/mcpp#742

Cross-verification before the mcpp pull request merges. This branch is not
merged; it is removed once the pull request is decided.
…ument of one configuration names its sets without a prefix (SPEC-005 v1.6)
…status line states the build while it runs

The validation project's cross-verification of this pull request printed
nothing for 40 minutes between the last `Compiling` line and `Finished`:
ninja ran with `--quiet` and its output was examined after it exited.
Design: .agents/docs/2026-09-29-build-progress-display-design.md.

- ninja runs without `--quiet` and is read line by line (stream_exec). Its
  status lines (NINJA_STATUS, with an escape-sequence prefix that a nested
  ninja's relayed copy loses) give the counts; its log gives which step
  finished and when it started and ended; a step record written beside
  build.ninja (steps.tsv) names each step's package and identity; the
  `__action` wrapper reports when a check or prepare action starts.
- A package's line is written when every step the graph assigns to it has
  run, or when the build ends: `done <span>`, `cached N units`, `failed`, or
  the steps that ran. Requested packages are listed, dependencies folded into
  one line; --verbose lists every package and each step as `[f/t] <command>`.
- A build program has one line: `ran <time>`, `cached`, `failed`; `waiting`,
  `compiling` and `running` while live.
- On a terminal the live lines and one status line are drawn below the output
  (mcpp.ui's region, one writer for every line, ten frames a second at most);
  in a log the status line is written after a minute of silence.
- A failed step is reported when it fails, not after ninja exits.
- `Finished` states the whole command's time and, for ten seconds or more,
  how it was spent and the dominant step.
- Terminal detection works on macOS and Windows; a Windows console receives
  UTF-16. mcpp.log stays a leaf: mcpp.ui installs the terminal sink for its
  verbose records, and the model logs its events to the log file.
- e2e 842 (log medium) and 843 (a pseudo-terminal); unit tests of the
  readers, the record, the text measures, the region and the completion rule;
  the e2e tests that read the old lines follow them, and those that read a
  `Compiling` line as "the build planned" ask build.ninja's time instead.
- docs/00, 09, 30, 40 in both languages; CHANGELOG.
@speak-agent speak-agent changed the title 2026.9.29.5: a workspace's build programs are reused across selections and run dependencies first, the build database and --configure-only plan by configuration, and the output names what it reports 2026.9.29.5: a workspace's build programs are reused across selections, the build database plans by configuration, and a build reports each step once with its outcome while a status line states the build Sep 29, 2026
…ed one did

stream_exec ran ninja in mcpp's process group and did not register it with
the signal guard, so signalling mcpp alone left ninja running (e2e 340, the
Linux e2e shard). It now asks the bounded launcher for a group of its own,
which the guard kills when mcpp is signalled, as capture_exec's child is.
@Sunrisepeak
Sunrisepeak merged commit ff04535 into main Sep 29, 2026
44 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants