fix(__main__): --verbose progress goes to stderr (was stdout) #11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/dune-extract-verbose-stderr-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Caught during the full test+validate sweep ("test and validate everything besides running the server").
--verboseprogress lines printed to stdout while every other status line printed to stderr, so in2>&1 | headthe per-pak block appeared AFTER the "Wrote N files" footer.Fix
Keeps stdout free for any future piped-data use (none today, but the
diffsubcommand already writes to stdout when--outputis absent, so stream separation matters).Validated
Now prints
PAK ... TIME+ per-pak lines BEFOREFDI parse completeandWrote N files, matching the natural order.No regression
Flag still controls verbosity; non-verbose runs are unchanged (progress is
None). Three-line diff.Caught during the full test+validate sweep. `progress = print if args.verbose else None` defaulted to stdout, while every other status line in the pipeline writes to stderr. Result: in `2>&1 | head`, the per-pak progress block appeared AFTER the "Wrote N files" footer instead of interleaved with the FDI parse output, because stdout flushes later than stderr. Fix: wrap print in a stderr-writing lambda so progress lines flow in order. Keeps stdout free for any future piped-data use (none today, but the diff subcommand already writes to stdout when --output is absent, so stream separation matters). Validated: DUNE_EXTRACT_SKIP_ROWS=1 DUNE_EXTRACT_SKIP_LOCALIZATION=1 \ python3 -m dune_extract --verbose --categories Misc 2>&1 | head -10 -> now prints "PAK ... TIME" + per-pak lines BEFORE "FDI parse complete" and "Wrote N files", matching the natural order. No regression — flag still controls verbosity; non-verbose runs are unchanged (progress is None).