Use serde 1.0.221 instead of serde_derive hackery (#38137)
serde 1.0.221 introduced serde_core into the build graph, which should render explicitly depending on serde_derive for faster build times an obsolote method. Besides, I'm not even sure if that worked for us. My hunch is that at least one of our deps would have `serde` with derive feature enabled.. and then, most of the crates using `serde_derive` explicitly were also depending on gpui, which depended on `serde`.. thus, we wouldn't have gained anything from explicit dep on `serde_derive` Release Notes: - N/A
This commit is contained in:
@@ -31,6 +31,10 @@ pub fn init(cx: &mut App) {
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct ReleaseNotesBody {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
title: String,
|
||||
release_notes: String,
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ postage.workspace = true
|
||||
project.workspace = true
|
||||
schemars.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
settings.workspace = true
|
||||
telemetry.workspace = true
|
||||
util.workspace = true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use anyhow::Result;
|
||||
use gpui::App;
|
||||
use schemars::JsonSchema;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::{Settings, SettingsKey, SettingsSources, SettingsUi};
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
|
||||
@@ -52,7 +52,6 @@ sea-orm = { version = "1.1.0-rc.1", features = ["sqlx-postgres", "postgres-array
|
||||
semantic_version.workspace = true
|
||||
semver.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
serde_json.workspace = true
|
||||
sha2.workspace = true
|
||||
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "json", "time", "uuid", "any"] }
|
||||
|
||||
@@ -5,7 +5,7 @@ use anyhow::Result;
|
||||
use async_trait::async_trait;
|
||||
use gpui::{BackgroundExecutor, SharedString, TestAppContext};
|
||||
use rand::prelude::*;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{
|
||||
ops::{Deref, DerefMut, Range},
|
||||
rc::Rc,
|
||||
|
||||
@@ -157,5 +157,9 @@ impl UserBackfiller {
|
||||
struct GithubUser {
|
||||
id: i32,
|
||||
created_at: DateTime<Utc>,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
name: Option<String>,
|
||||
}
|
||||
|
||||
@@ -49,7 +49,6 @@ release_channel.workspace = true
|
||||
rpc.workspace = true
|
||||
schemars.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
serde_json.workspace = true
|
||||
settings.workspace = true
|
||||
smallvec.workspace = true
|
||||
|
||||
@@ -24,7 +24,7 @@ use rpc::{
|
||||
ErrorCode, ErrorExt,
|
||||
proto::{self, ChannelVisibility, PeerId},
|
||||
};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::Settings;
|
||||
use smallvec::SmallVec;
|
||||
use std::{mem, sync::Arc};
|
||||
|
||||
@@ -127,6 +127,10 @@ struct Notification<'a, T> {
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
struct AnyNotification<'a> {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "Part of the JSON-RPC protocol - we expect the field to be present in a valid JSON-RPC notification"
|
||||
)]
|
||||
jsonrpc: &'a str,
|
||||
method: String,
|
||||
#[serde(default)]
|
||||
|
||||
@@ -115,6 +115,10 @@ pub struct ExampleToml {
|
||||
pub url: String,
|
||||
pub revision: String,
|
||||
pub language_extension: Option<String>,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub insert_id: Option<String>,
|
||||
#[serde(default = "default_true")]
|
||||
pub require_lsp: bool,
|
||||
|
||||
@@ -27,7 +27,6 @@ schemars.workspace = true
|
||||
search.workspace = true
|
||||
settings.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
text.workspace = true
|
||||
theme.workspace = true
|
||||
ui.workspace = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use anyhow::Result;
|
||||
use schemars::JsonSchema;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::{Settings, SettingsKey, SettingsSources, SettingsUi};
|
||||
|
||||
#[derive(Deserialize, Debug, Clone, Copy, PartialEq)]
|
||||
|
||||
@@ -16,25 +16,53 @@ use git::{
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct CommitDetails {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
commit: Commit,
|
||||
author: Option<User>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct Commit {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
author: Author,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct Author {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
name: String,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
email: String,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
date: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct User {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub login: String,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub id: u64,
|
||||
pub avatar_url: String,
|
||||
}
|
||||
|
||||
@@ -25,22 +25,38 @@ fn pull_request_number_regex() -> &'static Regex {
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct CommitDetails {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
commit: Commit,
|
||||
author: Option<User>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct Commit {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
author: Author,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct Author {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
email: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct User {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub id: u64,
|
||||
pub avatar_url: String,
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ postage.workspace = true
|
||||
project.workspace = true
|
||||
schemars.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
serde_json.workspace = true
|
||||
settings.workspace = true
|
||||
strum.workspace = true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use editor::EditorSettings;
|
||||
use gpui::Pixels;
|
||||
use schemars::JsonSchema;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::{Settings, SettingsKey, SettingsSources, SettingsUi};
|
||||
use ui::scrollbars::{ScrollbarVisibility, ShowScrollbar};
|
||||
use workspace::dock::DockPosition;
|
||||
|
||||
@@ -114,7 +114,6 @@ schemars.workspace = true
|
||||
seahash = "4.1"
|
||||
semantic_version.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
serde_json.workspace = true
|
||||
slotmap = "1.0.6"
|
||||
smallvec.workspace = true
|
||||
|
||||
@@ -112,7 +112,6 @@ pub mod private {
|
||||
pub use inventory;
|
||||
pub use schemars;
|
||||
pub use serde;
|
||||
pub use serde_derive;
|
||||
pub use serde_json;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use schemars::JsonSchema;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// The fallback fonts that can be configured for a given font.
|
||||
/// Fallback fonts family names are stored here.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use gpui::{Action, actions};
|
||||
use gpui_macros::register_action;
|
||||
use schemars::JsonSchema;
|
||||
use serde_derive::Deserialize;
|
||||
use serde::Deserialize;
|
||||
|
||||
#[test]
|
||||
fn test_action_macros() {
|
||||
@@ -19,7 +19,7 @@ fn test_action_macros() {
|
||||
#[serde(deny_unknown_fields)]
|
||||
struct AnotherAction;
|
||||
|
||||
#[derive(PartialEq, Clone, gpui::private::serde_derive::Deserialize)]
|
||||
#[derive(PartialEq, Clone, gpui::private::serde::Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
struct RegisterableAction {}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ project.workspace = true
|
||||
schemars.workspace = true
|
||||
search.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
serde_json.workspace = true
|
||||
settings.workspace = true
|
||||
smallvec.workspace = true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use editor::EditorSettings;
|
||||
use gpui::Pixels;
|
||||
use schemars::JsonSchema;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::{Settings, SettingsKey, SettingsSources, SettingsUi};
|
||||
use ui::scrollbars::{ScrollbarVisibility, ShowScrollbar};
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ project.workspace = true
|
||||
runtimelib.workspace = true
|
||||
schemars.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
serde_json.workspace = true
|
||||
settings.workspace = true
|
||||
smol.workspace = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use gpui::App;
|
||||
use schemars::JsonSchema;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::{Settings, SettingsKey, SettingsSources, SettingsUi};
|
||||
|
||||
/// Settings for configuring REPL display and behavior.
|
||||
|
||||
@@ -29,7 +29,6 @@ release_channel.workspace = true
|
||||
rust-embed.workspace = true
|
||||
schemars.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
serde_json.workspace = true
|
||||
settings_ui_macros.workspace = true
|
||||
serde_json_lenient.workspace = true
|
||||
|
||||
@@ -1588,7 +1588,7 @@ mod tests {
|
||||
use super::*;
|
||||
// This is so the SettingsUi macro can still work properly
|
||||
use crate as settings;
|
||||
use serde_derive::Deserialize;
|
||||
use serde::Deserialize;
|
||||
use settings_ui_macros::{SettingsKey, SettingsUi};
|
||||
use unindent::Unindent;
|
||||
|
||||
@@ -2232,7 +2232,9 @@ mod tests {
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct JournalSettings {
|
||||
#[expect(unused)]
|
||||
pub path: String,
|
||||
#[expect(unused)]
|
||||
pub hour_format: HourFormat,
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,15 @@ pub struct SupermavenDownloadResponse {
|
||||
#[derive(Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SupermavenUser {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
id: String,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
email: String,
|
||||
api_key: String,
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ libc.workspace = true
|
||||
release_channel.workspace = true
|
||||
schemars.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
settings.workspace = true
|
||||
sysinfo.workspace = true
|
||||
smol.workspace = true
|
||||
|
||||
@@ -4,7 +4,7 @@ use alacritty_terminal::vte::ansi::{
|
||||
use collections::HashMap;
|
||||
use gpui::{AbsoluteLength, App, FontFallbacks, FontFeatures, FontWeight, Pixels, px};
|
||||
use schemars::JsonSchema;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use settings::{SettingsKey, SettingsSources, SettingsUi};
|
||||
use std::path::PathBuf;
|
||||
|
||||
@@ -31,7 +31,6 @@ parking_lot.workspace = true
|
||||
refineable.workspace = true
|
||||
schemars = { workspace = true, features = ["indexmap2"] }
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
serde_json.workspace = true
|
||||
serde_json_lenient.workspace = true
|
||||
serde_repr.workspace = true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use gpui::Hsla;
|
||||
use serde_derive::Deserialize;
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::{
|
||||
AccentContent, amber, blue, cyan, gold, grass, indigo, iris, jade, lime, orange, pink, purple,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use gpui::Hsla;
|
||||
use serde_derive::Deserialize;
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::{
|
||||
PlayerColorContent, amber, blue, jade, lime, orange, pink, purple, red, try_parse_color,
|
||||
|
||||
@@ -21,8 +21,20 @@ const ZED_THEME_SCHEMA_URL: &str = "https://zed.dev/schema/themes/v0.2.0.json";
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct FamilyMetadata {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub name: String,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub author: String,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub themes: Vec<ThemeMetadata>,
|
||||
|
||||
/// Overrides for specific syntax tokens.
|
||||
@@ -31,6 +43,10 @@ struct FamilyMetadata {
|
||||
/// to an exact set of scopes when it is not otherwise possible
|
||||
/// to rely on the default mappings in the theme importer.
|
||||
#[serde(default)]
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub syntax: IndexMap<String, Vec<String>>,
|
||||
}
|
||||
|
||||
|
||||
@@ -6,12 +6,32 @@ use crate::vscode::VsCodeTokenColor;
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct VsCodeTheme {
|
||||
#[serde(rename = "$schema")]
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub schema: Option<String>,
|
||||
pub name: Option<String>,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub author: Option<String>,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub maintainers: Option<Vec<String>>,
|
||||
#[serde(rename = "semanticClass")]
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub semantic_class: Option<String>,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
#[serde(rename = "semanticHighlighting")]
|
||||
pub semantic_highlighting: Option<bool>,
|
||||
pub colors: Colors,
|
||||
|
||||
@@ -38,7 +38,6 @@ regex.workspace = true
|
||||
schemars.workspace = true
|
||||
search.workspace = true
|
||||
serde.workspace = true
|
||||
serde_derive.workspace = true
|
||||
serde_json.workspace = true
|
||||
settings.workspace = true
|
||||
task.workspace = true
|
||||
|
||||
@@ -3,7 +3,7 @@ use gpui::{Action, Context, Window, actions};
|
||||
use language::Point;
|
||||
use schemars::JsonSchema;
|
||||
use search::{BufferSearchBar, SearchOptions, buffer_search};
|
||||
use serde_derive::Deserialize;
|
||||
use serde::Deserialize;
|
||||
use settings::Settings;
|
||||
use std::{iter::Peekable, str::Chars};
|
||||
use util::serde::default_true;
|
||||
|
||||
@@ -38,7 +38,7 @@ use normal::search::SearchSubmit;
|
||||
use object::Object;
|
||||
use schemars::JsonSchema;
|
||||
use serde::Deserialize;
|
||||
use serde_derive::Serialize;
|
||||
use serde::Serialize;
|
||||
use settings::{
|
||||
Settings, SettingsKey, SettingsSources, SettingsStore, SettingsUi, update_settings_file,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user