collab: Remove dependency on X11 (#19079)
collab: Remove dependency on X11 I'm not sure if this is the best solution (perhaps pulling `LanguageName` into a separate `language_types` crate would be better...?) - but it massively reduces build time / dependencies / size and means that the collab server no longer requires X11 libraries to be installed. tl;dr: `telemetry_events` requires the `language` crate, and the language crate requires a whole ton of extra stuff. Since telemetry_events only uses `language` for a single type definition (`LanguageName`, aka `String`), we can cut all of these out by using the base `String` type (This doesn't seem too terrible, given that all other telemetry fields are using basic datatypes like String as opposed to more strongly-typed variants). FYI the dependency tree for "why does collab need X11 libraries??" looks like this: ``` collab \- telemetry_events \- language |- gpui |- fuzzy | \- gpui |- git | \- gpui |- lsp | |- gpui | \- release_channel | \- gpui |- settings | |- fs | | \- gpui | \- gpui |- task | \- gpui \- theme \- gpui ``` Release Notes: - N/A
This commit is contained in:
parent
84b61c8b1a
commit
f1c45d988e
6 changed files with 6 additions and 30 deletions
|
@ -12,6 +12,5 @@ workspace = true
|
|||
path = "src/telemetry_events.rs"
|
||||
|
||||
[dependencies]
|
||||
language.workspace = true
|
||||
semantic_version.workspace = true
|
||||
serde.workspace = true
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
//! See [Telemetry in Zed](https://zed.dev/docs/telemetry) for additional information.
|
||||
|
||||
use language::LanguageName;
|
||||
use semantic_version::SemanticVersion;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{fmt::Display, sync::Arc, time::Duration};
|
||||
|
@ -150,7 +149,7 @@ pub struct AssistantEvent {
|
|||
pub model_provider: String,
|
||||
pub response_latency: Option<Duration>,
|
||||
pub error_message: Option<String>,
|
||||
pub language_name: Option<LanguageName>,
|
||||
pub language_name: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue