Skip to content

Commit 37239fd

Browse files
authored
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
1 parent 2b1f7d5 commit 37239fd

File tree

40 files changed

+144
-53
lines changed

40 files changed

+144
-53
lines changed

Cargo.lock

Lines changed: 18 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,8 @@ rustls-platform-verifier = "0.5.0"
617617
scap = { git = "https://github.com/zed-industries/scap", rev = "808aa5c45b41e8f44729d02e38fd00a2fe2722e7", default-features = false }
618618
schemars = { version = "1.0", features = ["indexmap2"] }
619619
semver = "1.0"
620-
serde = { version = "1.0", features = ["derive", "rc"] }
621-
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
622-
serde_json = { version = "1.0", features = ["preserve_order", "raw_value"] }
620+
serde = { version = "1.0.221", features = ["derive", "rc"] }
621+
serde_json = { version = "1.0.144", features = ["preserve_order", "raw_value"] }
623622
serde_json_lenient = { version = "0.2", features = [
624623
"preserve_order",
625624
"raw_value",

crates/auto_update_ui/src/auto_update_ui.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ pub fn init(cx: &mut App) {
3131

3232
#[derive(Deserialize)]
3333
struct ReleaseNotesBody {
34+
#[expect(
35+
unused,
36+
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"
37+
)]
3438
title: String,
3539
release_notes: String,
3640
}

crates/call/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ postage.workspace = true
3737
project.workspace = true
3838
schemars.workspace = true
3939
serde.workspace = true
40-
serde_derive.workspace = true
4140
settings.workspace = true
4241
telemetry.workspace = true
4342
util.workspace = true

crates/call/src/call_settings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use anyhow::Result;
22
use gpui::App;
33
use schemars::JsonSchema;
4-
use serde_derive::{Deserialize, Serialize};
4+
use serde::{Deserialize, Serialize};
55
use settings::{Settings, SettingsKey, SettingsSources, SettingsUi};
66

77
#[derive(Deserialize, Debug)]

crates/collab/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ sea-orm = { version = "1.1.0-rc.1", features = ["sqlx-postgres", "postgres-array
5252
semantic_version.workspace = true
5353
semver.workspace = true
5454
serde.workspace = true
55-
serde_derive.workspace = true
5655
serde_json.workspace = true
5756
sha2.workspace = true
5857
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "json", "time", "uuid", "any"] }

crates/collab/src/tests/random_channel_buffer_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use anyhow::Result;
55
use async_trait::async_trait;
66
use gpui::{BackgroundExecutor, SharedString, TestAppContext};
77
use rand::prelude::*;
8-
use serde_derive::{Deserialize, Serialize};
8+
use serde::{Deserialize, Serialize};
99
use std::{
1010
ops::{Deref, DerefMut, Range},
1111
rc::Rc,

crates/collab/src/user_backfiller.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,9 @@ impl UserBackfiller {
157157
struct GithubUser {
158158
id: i32,
159159
created_at: DateTime<Utc>,
160+
#[expect(
161+
unused,
162+
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"
163+
)]
160164
name: Option<String>,
161165
}

crates/collab_ui/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ release_channel.workspace = true
4949
rpc.workspace = true
5050
schemars.workspace = true
5151
serde.workspace = true
52-
serde_derive.workspace = true
5352
serde_json.workspace = true
5453
settings.workspace = true
5554
smallvec.workspace = true

crates/collab_ui/src/collab_panel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use rpc::{
2424
ErrorCode, ErrorExt,
2525
proto::{self, ChannelVisibility, PeerId},
2626
};
27-
use serde_derive::{Deserialize, Serialize};
27+
use serde::{Deserialize, Serialize};
2828
use settings::Settings;
2929
use smallvec::SmallVec;
3030
use std::{mem, sync::Arc};

0 commit comments

Comments
 (0)