zed/crates/gpui_util
Mattia Schiano fc952d52da
gpui: Add track_caller to gpui_util::log_err (#62538)
# Objective

Tiny annoyance, the standalone `gpui_util::log_err` was never annotated
with `#[track_caller]` so whenever it was called, the source location
would be `gpui_util::lib` instead of the appropriate location.

I checked and this is actually used in Zed in exactly one place:
`crates/extension_host/src/extension_host.rs:1095`. So *technically*
this can be considered a bug.

I use it quite frequently in my code, so this is more of a self-serving
pr.

## Solution

I added `#[track_caller]` to `gpui_util::log_err`.

## Testing

I ran the tests just in case and they all passed.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Added track_caller to gpui_util::log_err
2026-08-12 18:44:06 +00:00
..
src gpui: Add track_caller to gpui_util::log_err (#62538) 2026-08-12 18:44:06 +00:00
Cargo.toml Remove gpui's dependency on async-process (#59358) 2026-06-16 13:47:55 +00:00
LICENSE-APACHE