Provisional API: This reference documents current compiler behavior. Compatibility is not yet promised.
src/report.x
Command progress and completion receipts.
Functions
| Function | Summary |
|---|---|
report_configure | Resets process reporting for one command. |
report_duration | Formats microseconds as integer us, rounded whole ms, or seconds with two decimal places. |
report_file_bytes | Returns the size of a regular file. |
report_line | Writes one newline-terminated receipt to stderr when receipts are enabled. |
report_make_owned | Reports whether a parent Make recipe runs this process, which MAKELEVEL set to a positive count shows. |
report_now_us | Returns monotonic time in microseconds, or zero when the clock read fails. |
report_phase | Writes a muted phase receipt when receipts are enabled. |
report_progress | Updates the terminal’s transient progress line when transient mode is active. |
report_receipts | Returns whether stable completion receipts are currently enabled. |
report_size | Formats bytes as B, KiB, or MiB using binary unit boundaries. |
report_suspend | Clears the active transient line from stderr, if one exists. |
Functions
report_configure
void report_configure( int quiet, int plain, Symbol color_mode, int verbose, int dry_run, int inspecting)
Resets process reporting for one command.
Quiet, verbose, dry-run, and inspection modes disable receipts. Transient
progress additionally requires terminal stderr, non-plain output, and no
parent Make recipe. Plain output disables color; automatic color respects
terminal capability and NO_COLOR.
Source: src/report.x:97
report_duration
String report_duration(unsigned long microseconds)
Formats microseconds as integer us, rounded whole ms, or seconds with
two decimal places.
Source: src/report.x:55
report_file_bytes
unsigned long long report_file_bytes(String path)
Returns the size of a regular file.
NULL, a failed stat, or a non-regular path returns zero.
Source: src/report.x:46
report_line
void report_line(Symbol tone, String line)
Writes one newline-terminated receipt to stderr when receipts are enabled.
Any active transient line is cleared first, and line must be non-NULL.
Source: src/report.x:178
report_make_owned
int report_make_owned(void)
Reports whether a parent Make recipe runs this process, which MAKELEVEL
set to a positive count shows. Parallel recipes share one terminal and
one job budget without sharing reporter state.
Source: src/report.x:77
report_now_us
unsigned long report_now_us(void)
Returns monotonic time in microseconds, or zero when the clock read fails. The value measures elapsed time; it is not a wall-clock timestamp.
Source: src/report.x:36
report_phase
void report_phase( Symbol phase, int count, String noun, int cached, unsigned long microseconds)
Writes a muted phase receipt when receipts are enabled. A fully cached nonempty phase is marked up to date; a partial cache reports its cached count, and every receipt includes the elapsed time.
Source: src/report.x:226
report_progress
void report_progress(Symbol phase, int done, int total, String detail)
Updates the terminal’s transient progress line when transient mode is
active. Updates start after 125 ms and incomplete work is limited to one
update per 50 ms. detail may be NULL; output is clipped to the configured
terminal width and has no newline.
Source: src/report.x:190
report_receipts
int report_receipts(void)
Returns whether stable completion receipts are currently enabled.
Source: src/report.x:116
report_size
String report_size(unsigned long long bytes)
Formats bytes as B, KiB, or MiB using binary unit boundaries.
Byte counts are exact; larger units use one decimal place.
Source: src/report.x:64
report_suspend
void report_suspend(void)
Clears the active transient line from stderr, if one exists.
Source: src/report.x:169
Design notes
The reporter writes only to stderr. Its transient mode uses one carriage- return line and never takes terminal input or changes terminal modes.