Add simple output mode for bild tests

t-134·WorkTask·
·
·
·Omni/Bild.hs
Created3 months ago·Updated3 months ago

Description

Edit

Problem

When running bild's example tests (test_bildExamples), sub-bild processes are spawned that interfere with the parent's LineManager. The nested LineManager calls cause terminal output corruption.

Root Cause

In Omni/Bild.hs lines 201-214, test_bildExamples calls analyzeAll False and build False False 4 1 which create their own LineManagers. When these run inside the parent bild's test harness (which also has a LineManager active), the terminal state gets corrupted.

The reentrant check in withLineManager (Omni/Log/Concurrent.hs:66-67) only works if the SAME LineManager is reused, but child processes create entirely new managers.

Solution

Add a "simple output mode" or "quiet mode" for bild that: 1. Bypasses LineManager entirely 2. Just prints simple status lines to stdout/stderr 3. Is enabled when running bild tests

Implementation Plan

1. Add a new parameter to analyzeAll and build functions (e.g., simpleOutput :: Bool) 2. When simpleOutput=True, skip withLineManager and use plain Log.info/Log.pass calls 3. Update test_bildBild and test_bildExamples to pass simpleOutput=True 4. Alternatively, detect if running inside another bild process via environment variable

Files to Modify

  • Omni/Bild.hs - analyzeAll, build functions and tests
  • Omni/Log/Concurrent.hs - possibly add detection for nested execution

Timeline (0)

No activity yet.