Repository navigation
Tags
Tags
Capture the bootstrap timer's output on its own stream (#184) * Anchor the bootstrap timer's grep to the `time -p` output line `bin/bootstrap.sh` measures how long the Bazel setup step takes with: TIME=$((time -p run) 2>&1 | grep real | awk '{print int(1000 * $2)}') The `grep` is unanchored, so it matches any line of `run`'s output containing the substring "real", not just the `real <secs>` line `time -p` emits. When a second line matches, awk prints a number for each one and `TIME` ends up multi-line, e.g. `0\n12480`. This is easy to hit in practice: `run` invokes Bazel, whose output includes the workspace path, so any repo whose directory name contains "real" -- say `realtime-app` or `unreal-editor-tools` -- trips it. `bootstrap.sh` then passes that value to `cli.sh` as `BOOTSTRAP_TIME`, where DURATION=$((NOW - START + BOOTSTRAP_TIME)) is an invalid arithmetic expression. A syntax error in `$(( ))` exits a non-interactive shell, so the command dies before its payload ever runs: bin/cli.sh: line 77: 0 12480: syntax error in expression (error token is "12480") Every jazelle invocation from such a repo fails this way, and the message gives no hint that a directory name is responsible. Anchor the match to `^real[[:space:]]`. That is the line `time -p` writes, so anchoring can only drop spurious matches, never the genuine one. Also harden `cli.sh` against a malformed `BOOTSTRAP_TIME` from any source, so a bad value degrades to zero instead of taking the whole command down. Timing telemetry is not worth failing a build over. Adds a regression test that runs `bin/cli.sh` with a non-numeric `BOOTSTRAP_TIME` and asserts the command still runs. It fails without the `cli.sh` change and passes with it. * Bump to version 0.0.0-standalone.108 * Capture the bootstrap timing on its own stream Per review feedback: rather than filtering a stream that carries both `run`'s output and the `time -p` report, keep them apart in the first place. `run`'s output is discarded before the group's redirect captures the timing, so awk reads only the three lines `time -p` emits. This also covers a case anchoring the match does not: when `run`'s final write has no trailing newline, its last line runs straight into the `real <secs>` line, e.g. INFO: /code/realtime-app 100%real 0.20 An unanchored `grep real` reads 100 as the duration and an anchored one matches nothing. Separating the streams reports 200ms in both cases, and in the original multi-line case that motivated this change.
Bzlmod prep (#183) * resolve to correct binary locations regardless of whether we're using WORKSPACE or bzlmod * Bump to version 0.0.0-standalone.107
Bump to version 0.0.0-standalone.103 (#177) * Fixed vendor paths, switched from yarn commands to npm commands because of auth issues. * Linting fix * Add interactive flag * Linting
Replace inquirer library with prompts, and update vendor folder with … …new dependencies. (#172) * Replace inquirer with lightweight prompts library * Bump version to 0.0.0-standalone.102
PreviousNext