idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.78k stars 1.05k forks source link

Stop outputting machine readable stuff to the console. Use pipes instead. #26555

Open dschwen opened 10 months ago

dschwen commented 10 months ago

Reason

We currently output a bunch of stuff to the console that is meant to be parsed by other programs like the test harness or VSCode (for autocomplete syntax).

For that to work we insert delimiters like

**START JSON DATA**
...
**END JSON DATA**

This seems kludgy and is brittle (for example we have to turn of timed perf graph printing).

Design

Add an optional filename argument to --json, --list-constructed-objects, --yaml, --syntax etc. Then output clean JSON/YAML etc. into that file. On the test harness side this file can be a named pipe to avoid any disk IO (which might incur network traffic).

This would also enable clean output of multiple data items.

Impact

Clean interface for the plumbing.

dschwen commented 10 months ago

Argh, --json already has an optional argument to search the dump. :scream: