miller/pkg
John Kerl be19a21280
Remove os.Exit callsites below the entrypoint: phase 2 (#2202)
* Remove os.Exit callsites below the entrypoint: phase 2 (plans/exit.md)

Phase 2 of plans/exit.md: the FlagParser signature change.

- FlagParser gains an error return; all 259 inline parser closures in
  option_parse.go and NoOpParse1 updated (mechanical rewrite, compiler-checked).
- FlagTable.Parse returns (bool, error); its nine callers (climain passes one
  and two, .mlrrc line handling, verb-local flag parsing in tee/join/put/
  filter/split, and the repl/script terminals) propagate the error instead of
  letting parsers kill the process.
- cli.CheckArgCount returns its missing-argument message as an error rather
  than printing and exiting; new cli.FlagErrorf (counterpart of VerbErrorf)
  carries user-facing main-flag messages.
- The 14 print-and-exit sites inside parser closures become returned errors;
  --list-color-codes/--list-color-names return ExitRequest{0} after printing.
- The repl and script terminals translate ExitRequest into their int return
  codes, so 'mlr repl --list-color-codes' still exits 0.
- pkg/cli is now os.Exit-free; stale comments about exiting parsers updated
  (the completion introspection accessors remain, since parsers mutate the
  options struct).

Stderr messages and exit codes are byte-identical, including the two-line
missing-argument and --seed messages and the trailing-period forms pinned by
test/cases/cli-mfrom/0003.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Merge main (recutils #2201); convert its three new parser closures

Same mechanical rewrite as the rest of phase 2: error return signature plus
final 'return nil' on --irecutils/--orecutils/--recutils.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 14:09:57 -04:00
..
auxents
bifs
cli Remove os.Exit callsites below the entrypoint: phase 2 (#2202) 2026-07-15 14:09:57 -04:00
climain Remove os.Exit callsites below the entrypoint: phase 2 (#2202) 2026-07-15 14:09:57 -04:00
colorizer
dkvpx
dsl Document that NF is dynamic within a record (#2192) (#2193) 2026-07-14 17:23:50 -04:00
entrypoint Remove os.Exit callsites below the entrypoint: phase 1 (#2198) 2026-07-15 11:34:01 -04:00
go-csv
input Add GNU recutils (.rec) as a Miller I/O format (#2201) 2026-07-15 11:51:16 -04:00
lib Remove os.Exit callsites below the entrypoint: phase 1 (#2198) 2026-07-15 11:34:01 -04:00
mlrval
output Add GNU recutils (.rec) as a Miller I/O format (#2201) 2026-07-15 11:51:16 -04:00
parsing
pbnjay-strptime
platform
runtime
scan
stream
terminals Remove os.Exit callsites below the entrypoint: phase 2 (#2202) 2026-07-15 14:09:57 -04:00
transformers Remove os.Exit callsites below the entrypoint: phase 2 (#2202) 2026-07-15 14:09:57 -04:00
types
version
README.md

Please see ../../README-dev.md for an overview; please see each subdirectory for details about it.