Expand description
Where JSON reports go, and the envelope of a command that failed before it could produce its report.
An application binary writes its report to stdout, unless the
REPORT_PATH_ENV variable names a file. The siderite tool sets it
when it runs the application through cargo run, and sends the
child’s stdout to stderr, so whatever the application factory prints
can never corrupt the JSON on stdout.
Constants§
- FAILED_
CODE - Diagnostic code of a command that failed without a report (exit
1). - NO_
REPORT_ CODE - Diagnostic code of an application that exited without writing its
report (build failure, crash, or a
siderite-cliwithout--json). - REPORT_
PATH_ ENV - Environment variable naming the file an application binary writes its JSON report to instead of stdout.
- USAGE_
CODE - Diagnostic code of a usage error (exit
2).
Functions§
- emit
- Write a rendered report to
path(the value ofREPORT_PATH_ENV) or, when it isNone, to stdout. - emit_
json - Render
reportas JSON andemitit. - error_
envelope - The failure envelope of a
CliError. - failure
- The envelope of
commandwhen it failed before producing a report:okisfalse,dataisnulland one error diagnostic explains why.