Skip to content

Mitts 0.3.2

Choose a tag to compare

@alex09x alex09x released this 20 Oct 19:07
· 229 commits to main since this release

Mitts 0.3.2 drops the built-in list of "known pure" proc macros in favour of a project-level declaration, and teaches the benchmark harness to measure on a machine that is never idle.

Engine (ada8b2b, 9d89a07, 561ae0f)

  • Proc macros are pure unless the project says otherwise. A unit that depended on any proc macro outside a hard-coded list of two dozen names was keyed on its absolute manifest directory, so every new worktree recompiled and relinked it although nothing had changed; rustversion in [dev-dependencies] was enough to path-lock every test target of a crate. The list is gone: every macro's dependents now get path-independent keys that are shared across checkouts. A macro that reads package files while it expands (sqlx, askama, rust-embed, include_dir, a local derive) is declared in the root Cargo.toml:

    [workspace.metadata.mitts]          # [package.metadata.mitts] in a single crate
    impure-proc-macros = ["sqlx", "askama"]

    Its direct dependents are keyed on every file in their package and on their absolute path, so an edited template rebuilds them and another checkout never reuses them. A malformed table fails the build; an unknown key warns once. The artifact scan that keeps a path-embedding artifact from being shared across checkouts is unchanged. Verified against a real crates.io macro that registers nothing with rustc (include_dir): declared, an edited asset changes the key; undeclared, it does not, exactly as with Cargo.

  • MITTS_LOG_KEYS=1 prints every unit's action key with its flags, inputs and dependency hashes, and the reason whenever a unit is keyed on its absolute path.

Benchmark harness (55b71e5, ca8ebc1, 3468eb4, c87afde, f718f21)

  • The quiet-rig gate measures the machine's CPU baseline before a run and accepts the larger of --max-busy and baseline + 0.10. A steady foreign load that holds for five samples with no compiler running is adopted as the new baseline and released when it ends. A timeout no longer aborts the run: the result is flagged GATE_TIMEOUT and every gate decision is recorded under gate_events.
  • An idle sccache server is not a foreign compiler; the macOS device lookup is cached per run; a swarm stage reads the load average instead of re-gating; a results file whose project ended in ERROR or NOISY no longer blocks a rerun into the same file.

Full history: v0.3.1...v0.3.2