Skip to content

Show compilation progress: stages, counters and timings #176

Closed

Description

@blacktrs

Problem

A compile is silent for a long time: a self-build takes 1–6 minutes and a large application 3–6 minutes, with no sign of which stage runs or how much is left. This makes the compiler hard to approach and hard to diagnose.

Proposal

Report build progress on stderr:

  • Pipeline stages: one line per stage with its position and elapsed time, e.g. [7/22] InferTypes 4.2s, and a total at the end.
  • Real counters only where the total is known in advance: input modules or files, functions emitted by EmitLlvm, clang jobs of a split build (clang 14/24), the link step.
  • No invented percentages or ETA for front-end passes: InferTypes re-runs and its iteration count is unknown, so show elapsed time and the current stage instead.

Output modes

  • TTY: a single updating line (bar or spinner).
  • Non-TTY (CI, logs): plain stage … done in Xs lines, no control characters.
  • --progress=auto|plain|json|off and --quiet. json is for IDEs and for bin/build itself.
  • --timings: a per-stage time table at the end; also useful for profiling the front end.

Constraints

  • stderr only; the stdout of the compiler and of compiled programs is untouched.
  • Update on stage boundaries and on a timer, never per function, so hot paths are not slowed.
  • Parallel clang jobs report through one aggregator so lines do not interleave.
  • The code lives in src/ and compiles with itself; it needs no new syntax and no BOOTSTRAP_VERSION raise.
  • Default output in CI stays terse (stage lines only).

Acceptance criteria

  • manticore build and manticore compile show stage progress on a TTY and plain lines when piped.
  • A split build shows a determinate clang n/N counter.
  • --progress=json emits one parsable object per event.
  • --quiet / --progress=off print nothing beyond errors; a compile's measured wall time does not regress.
  • A test checks the plain and json formats.

Notes

Complements #174 (manticore upgrade). Not part of #166; land after the next release.

Activity

  1. added
    enhancement
    on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfeature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions