zed/tooling
Kirill Bulatov a49db374b6
ci: Disable library backtrace capture in macOS test jobs (#64555)
Based on
https://github.com/zed-industries/zed/pull/64464#issuecomment-5763255028

With `RUST_BACKTRACE=1` set, `anyhow` captures a backtrace for every
error it constructs; on macOS this costs ~30ms per error, on Linux ~µs.
`Project::test` alone hits several such errors during setup
(`canonicalize`/`load` of the non-existent global `tasks.json` and
`debug.json`, worktree creation, buffer open), adding ~0.8s of fixed
cost per test on macOS.

`RUST_LIB_BACKTRACE=0` is checked by std before `RUST_BACKTRACE`, so
panics keep their backtraces while library error captures stop.
Set only on the macOS test jobs (`run_tests.yml`, `release.yml`), since
Linux and Windows pay nothing for the captures and keep the error-origin
backtraces in failure output.
Measured with `cargo nextest run -p editor --lib`: macOS 119s → 72s,
Linux 78s → 76s (noise).

Trade-off on macOS: a failing `.unwrap()` on an `anyhow::Error` in CI
output loses the backtrace of where the error was constructed; the panic
backtrace at the unwrap site is unaffected.

Release Notes:

- N/A
2026-09-21 16:23:34 +00:00
..
compliance Fix cargo shear warnings (#64340) 2026-09-17 08:49:31 +00:00
corgi/patches/scratch Fix corgi patches license softlink (#64374) 2026-09-17 09:24:59 +00:00
lints lints: Add map_lookup_then_insert lint (#62681) 2026-08-28 20:01:28 +00:00
perf Fix cargo shear warnings (#64340) 2026-09-17 08:49:31 +00:00
xtask ci: Disable library backtrace capture in macOS test jobs (#64555) 2026-09-21 16:23:34 +00:00