zed/crates/ui/Cargo.toml
zed-zippy[bot] 03db635ada
ui: Don't panic on invalid highlight indices in HighlightedLabel (#57291) (cherry-pick to stable) (#57366)
Cherry-pick of #57291 to stable

----
HighlightedLabel would crash the application if any provided highlight
index was invalid. In theory, this should never happen. In practice,
this can happen due to race conditions at call sites.

After this change, we only panic in debug builds. In release builds, we
log an error and return a label with no highlights. The error message
includes the call site so that it's easier to fix the root cause.

Related to #57290

Part of FR-11.

Release Notes:

- N/A

Co-authored-by: Oleksiy Syvokon <oleksiy@zed.dev>
2026-05-21 09:47:15 +00:00

43 lines
814 B
TOML

[package]
name = "ui"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
name = "ui"
path = "src/ui.rs"
[dependencies]
chrono.workspace = true
component.workspace = true
documented.workspace = true
gpui.workspace = true
gpui_macros.workspace = true
icons.workspace = true
itertools.workspace = true
log.workspace = true
menu.workspace = true
schemars.workspace = true
serde.workspace = true
smallvec.workspace = true
strum.workspace = true
theme.workspace = true
ui_macros.workspace = true
gpui_util.workspace = true
[target.'cfg(windows)'.dependencies]
windows.workspace = true
[dev-dependencies]
gpui = { workspace = true, features = ["test-support"] }
[package.metadata.cargo-machete]
ignored = ["log"]
[features]
default = []