mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Deserialize Theme
directly into the heap to avoid stack overflow
Co-Authored-By: Julia Risley <julia@zed.dev>
This commit is contained in:
parent
786d95b8c8
commit
1af8f4be19
27
Cargo.lock
generated
27
Cargo.lock
generated
@ -518,6 +518,7 @@ dependencies = [
|
|||||||
"menu",
|
"menu",
|
||||||
"project",
|
"project",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"settings",
|
"settings",
|
||||||
"smol",
|
"smol",
|
||||||
@ -1097,6 +1098,7 @@ dependencies = [
|
|||||||
"ipc-channel",
|
"ipc-channel",
|
||||||
"plist",
|
"plist",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1119,6 +1121,7 @@ dependencies = [
|
|||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"rpc",
|
"rpc",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"settings",
|
"settings",
|
||||||
"smol",
|
"smol",
|
||||||
"sum_tree",
|
"sum_tree",
|
||||||
@ -1228,6 +1231,7 @@ dependencies = [
|
|||||||
"sea-orm",
|
"sea-orm",
|
||||||
"sea-query",
|
"sea-query",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"settings",
|
"settings",
|
||||||
"sha-1 0.9.8",
|
"sha-1 0.9.8",
|
||||||
@ -1269,6 +1273,7 @@ dependencies = [
|
|||||||
"postage",
|
"postage",
|
||||||
"project",
|
"project",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"settings",
|
"settings",
|
||||||
"theme",
|
"theme",
|
||||||
"util",
|
"util",
|
||||||
@ -1739,6 +1744,7 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"parking_lot 0.11.2",
|
"parking_lot 0.11.2",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"smol",
|
"smol",
|
||||||
"sqlez",
|
"sqlez",
|
||||||
"sqlez_macros",
|
"sqlez_macros",
|
||||||
@ -1947,6 +1953,7 @@ dependencies = [
|
|||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"rpc",
|
"rpc",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"settings",
|
"settings",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"smol",
|
"smol",
|
||||||
@ -2100,6 +2107,7 @@ dependencies = [
|
|||||||
"project",
|
"project",
|
||||||
"search",
|
"search",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"settings",
|
"settings",
|
||||||
"sysinfo",
|
"sysinfo",
|
||||||
"theme",
|
"theme",
|
||||||
@ -2296,6 +2304,7 @@ dependencies = [
|
|||||||
"regex",
|
"regex",
|
||||||
"rope",
|
"rope",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"smol",
|
"smol",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
@ -2667,6 +2676,7 @@ dependencies = [
|
|||||||
"schemars",
|
"schemars",
|
||||||
"seahash",
|
"seahash",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"simplelog",
|
"simplelog",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
@ -3276,6 +3286,7 @@ dependencies = [
|
|||||||
"regex",
|
"regex",
|
||||||
"rpc",
|
"rpc",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"settings",
|
"settings",
|
||||||
"similar",
|
"similar",
|
||||||
@ -3471,6 +3482,7 @@ dependencies = [
|
|||||||
"parking_lot 0.11.2",
|
"parking_lot 0.11.2",
|
||||||
"postage",
|
"postage",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2 0.10.6",
|
"sha2 0.10.6",
|
||||||
"simplelog",
|
"simplelog",
|
||||||
@ -3491,6 +3503,7 @@ dependencies = [
|
|||||||
"prost-types 0.8.0",
|
"prost-types 0.8.0",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"sha2 0.10.6",
|
"sha2 0.10.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -3531,6 +3544,7 @@ dependencies = [
|
|||||||
"parking_lot 0.11.2",
|
"parking_lot 0.11.2",
|
||||||
"postage",
|
"postage",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"smol",
|
"smol",
|
||||||
"unindent",
|
"unindent",
|
||||||
@ -4450,6 +4464,7 @@ dependencies = [
|
|||||||
"bincode",
|
"bincode",
|
||||||
"plugin_macros",
|
"plugin_macros",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4460,6 +4475,7 @@ dependencies = [
|
|||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -4471,6 +4487,7 @@ dependencies = [
|
|||||||
"bincode",
|
"bincode",
|
||||||
"pollster",
|
"pollster",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"smol",
|
"smol",
|
||||||
"wasi-common",
|
"wasi-common",
|
||||||
@ -4628,6 +4645,7 @@ dependencies = [
|
|||||||
"regex",
|
"regex",
|
||||||
"rpc",
|
"rpc",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"settings",
|
"settings",
|
||||||
"sha2 0.10.6",
|
"sha2 0.10.6",
|
||||||
@ -5250,6 +5268,7 @@ dependencies = [
|
|||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"rsa",
|
"rsa",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"smol",
|
"smol",
|
||||||
"smol-timeout",
|
"smol-timeout",
|
||||||
"tempdir",
|
"tempdir",
|
||||||
@ -5673,6 +5692,7 @@ dependencies = [
|
|||||||
"postage",
|
"postage",
|
||||||
"project",
|
"project",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"settings",
|
"settings",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
@ -5861,6 +5881,7 @@ dependencies = [
|
|||||||
"postage",
|
"postage",
|
||||||
"schemars",
|
"schemars",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_path_to_error",
|
"serde_path_to_error",
|
||||||
"sqlez",
|
"sqlez",
|
||||||
@ -6481,6 +6502,7 @@ dependencies = [
|
|||||||
"procinfo",
|
"procinfo",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"settings",
|
"settings",
|
||||||
"shellexpand",
|
"shellexpand",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
@ -6512,6 +6534,7 @@ dependencies = [
|
|||||||
"project",
|
"project",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"settings",
|
"settings",
|
||||||
"shellexpand",
|
"shellexpand",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
@ -6571,6 +6594,7 @@ dependencies = [
|
|||||||
"indexmap",
|
"indexmap",
|
||||||
"parking_lot 0.11.2",
|
"parking_lot 0.11.2",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_path_to_error",
|
"serde_path_to_error",
|
||||||
"toml",
|
"toml",
|
||||||
@ -7564,6 +7588,7 @@ dependencies = [
|
|||||||
"project",
|
"project",
|
||||||
"search",
|
"search",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"settings",
|
"settings",
|
||||||
"tokio",
|
"tokio",
|
||||||
@ -8347,6 +8372,7 @@ dependencies = [
|
|||||||
"postage",
|
"postage",
|
||||||
"project",
|
"project",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"settings",
|
"settings",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
@ -8473,6 +8499,7 @@ dependencies = [
|
|||||||
"rust-embed",
|
"rust-embed",
|
||||||
"search",
|
"search",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_path_to_error",
|
"serde_path_to_error",
|
||||||
"settings",
|
"settings",
|
||||||
|
@ -68,6 +68,7 @@ resolver = "2"
|
|||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = { version = "1.0", features = ["preserve_order", "raw_value"] }
|
serde_json = { version = "1.0", features = ["preserve_order", "raw_value"] }
|
||||||
rand = { version = "0.8" }
|
rand = { version = "0.8" }
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ isahc = "1.7"
|
|||||||
lazy_static = "1.4"
|
lazy_static = "1.4"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = { version = "1.0", features = ["preserve_order"] }
|
serde_json = { version = "1.0", features = ["preserve_order"] }
|
||||||
smol = "1.2.5"
|
smol = "1.2.5"
|
||||||
tempdir = "0.3.7"
|
tempdir = "0.3.7"
|
||||||
|
@ -18,6 +18,7 @@ clap = { version = "3.1", features = ["derive"] }
|
|||||||
dirs = "3.0"
|
dirs = "3.0"
|
||||||
ipc-channel = "0.16"
|
ipc-channel = "0.16"
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
|
|
||||||
[target.'cfg(target_os = "macos")'.dependencies]
|
[target.'cfg(target_os = "macos")'.dependencies]
|
||||||
core-foundation = "0.9"
|
core-foundation = "0.9"
|
||||||
|
@ -35,7 +35,8 @@ time = { version = "0.3", features = ["serde", "serde-well-known"] }
|
|||||||
tiny_http = "0.8"
|
tiny_http = "0.8"
|
||||||
uuid = { version = "1.1.2", features = ["v4"] }
|
uuid = { version = "1.1.2", features = ["v4"] }
|
||||||
url = "2.2"
|
url = "2.2"
|
||||||
serde = { version = "*", features = ["derive"] }
|
serde = { version = "*", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
settings = { path = "../settings" }
|
settings = { path = "../settings" }
|
||||||
tempfile = "3"
|
tempfile = "3"
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ scrypt = "0.7"
|
|||||||
sea-orm = { git = "https://github.com/zed-industries/sea-orm", rev = "18f4c691085712ad014a51792af75a9044bacee6", features = ["sqlx-postgres", "postgres-array", "runtime-tokio-rustls"] }
|
sea-orm = { git = "https://github.com/zed-industries/sea-orm", rev = "18f4c691085712ad014a51792af75a9044bacee6", features = ["sqlx-postgres", "postgres-array", "runtime-tokio-rustls"] }
|
||||||
sea-query = "0.27"
|
sea-query = "0.27"
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
sha-1 = "0.9"
|
sha-1 = "0.9"
|
||||||
sqlx = { version = "0.6", features = ["runtime-tokio-rustls", "postgres", "json", "time", "uuid", "any"] }
|
sqlx = { version = "0.6", features = ["runtime-tokio-rustls", "postgres", "json", "time", "uuid", "any"] }
|
||||||
|
@ -44,6 +44,7 @@ futures = "0.3"
|
|||||||
log = "0.4"
|
log = "0.4"
|
||||||
postage = { version = "0.4.1", features = ["futures-traits"] }
|
postage = { version = "0.4.1", features = ["futures-traits"] }
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
call = { path = "../call", features = ["test-support"] }
|
call = { path = "../call", features = ["test-support"] }
|
||||||
|
@ -24,6 +24,7 @@ lazy_static = "1.4.0"
|
|||||||
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
||||||
parking_lot = "0.11.1"
|
parking_lot = "0.11.1"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
smol = "1.2"
|
smol = "1.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -54,6 +54,7 @@ parking_lot = "0.11"
|
|||||||
postage = { version = "0.4", features = ["futures-traits"] }
|
postage = { version = "0.4", features = ["futures-traits"] }
|
||||||
rand = { version = "0.8.3", optional = true }
|
rand = { version = "0.8.3", optional = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
smallvec = { version = "1.6", features = ["union"] }
|
smallvec = { version = "1.6", features = ["union"] }
|
||||||
smol = "1.2"
|
smol = "1.2"
|
||||||
tree-sitter-rust = { version = "*", optional = true }
|
tree-sitter-rust = { version = "*", optional = true }
|
||||||
|
@ -25,10 +25,11 @@ postage = { version = "0.4", features = ["futures-traits"] }
|
|||||||
project = { path = "../project" }
|
project = { path = "../project" }
|
||||||
search = { path = "../search" }
|
search = { path = "../search" }
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
settings = { path = "../settings" }
|
settings = { path = "../settings" }
|
||||||
sysinfo = "0.27.1"
|
sysinfo = "0.27.1"
|
||||||
theme = { path = "../theme" }
|
theme = { path = "../theme" }
|
||||||
tree-sitter-markdown = { git = "https://github.com/MDeiml/tree-sitter-markdown", rev = "330ecab87a3e3a7211ac69bbadc19eabecdb1cca" }
|
tree-sitter-markdown = { git = "https://github.com/MDeiml/tree-sitter-markdown", rev = "330ecab87a3e3a7211ac69bbadc19eabecdb1cca" }
|
||||||
urlencoding = "2.1.2"
|
urlencoding = "2.1.2"
|
||||||
util = { path = "../util" }
|
util = { path = "../util" }
|
||||||
workspace = { path = "../workspace" }
|
workspace = { path = "../workspace" }
|
||||||
|
@ -24,6 +24,7 @@ smol = "1.2.5"
|
|||||||
regex = "1.5"
|
regex = "1.5"
|
||||||
git2 = { version = "0.15", default-features = false }
|
git2 = { version = "0.15", default-features = false }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
|
@ -42,6 +42,7 @@ resvg = "0.14"
|
|||||||
schemars = "0.8"
|
schemars = "0.8"
|
||||||
seahash = "4.1"
|
seahash = "4.1"
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
smallvec = { version = "1.6", features = ["union"] }
|
smallvec = { version = "1.6", features = ["union"] }
|
||||||
smol = "1.2"
|
smol = "1.2"
|
||||||
|
@ -47,6 +47,7 @@ postage = { version = "0.4.1", features = ["futures-traits"] }
|
|||||||
rand = { version = "0.8.3", optional = true }
|
rand = { version = "0.8.3", optional = true }
|
||||||
regex = "1.5"
|
regex = "1.5"
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = { version = "1", features = ["preserve_order"] }
|
serde_json = { version = "1", features = ["preserve_order"] }
|
||||||
similar = "1.3"
|
similar = "1.3"
|
||||||
smallvec = { version = "1.6", features = ["union"] }
|
smallvec = { version = "1.6", features = ["union"] }
|
||||||
|
@ -14,7 +14,7 @@ name = "test_app"
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
test-support = [
|
test-support = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"collections/test-support",
|
"collections/test-support",
|
||||||
"gpui/test-support",
|
"gpui/test-support",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
@ -63,9 +63,11 @@ lazy_static = "1.4"
|
|||||||
objc = "0.2"
|
objc = "0.2"
|
||||||
parking_lot = "0.11.1"
|
parking_lot = "0.11.1"
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
sha2 = "0.10"
|
sha2 = "0.10"
|
||||||
simplelog = "0.9"
|
simplelog = "0.9"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = { version = "1.0", features = ["preserve_order"] }
|
serde_json = { version = "1.0", features = ["preserve_order"] }
|
||||||
|
@ -20,6 +20,7 @@ prost = "0.8"
|
|||||||
prost-types = "0.8"
|
prost-types = "0.8"
|
||||||
reqwest = "0.11"
|
reqwest = "0.11"
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
sha2 = "0.10"
|
sha2 = "0.10"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
@ -23,6 +23,7 @@ lsp-types = "0.91"
|
|||||||
parking_lot = "0.11"
|
parking_lot = "0.11"
|
||||||
postage = { version = "0.4.1", features = ["futures-traits"] }
|
postage = { version = "0.4.1", features = ["futures-traits"] }
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = { version = "1.0", features = ["raw_value"] }
|
serde_json = { version = "1.0", features = ["raw_value"] }
|
||||||
smol = "1.2"
|
smol = "1.2"
|
||||||
|
|
||||||
|
@ -6,5 +6,6 @@ publish = false
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
bincode = "1.3"
|
bincode = "1.3"
|
||||||
plugin_macros = { path = "../plugin_macros" }
|
plugin_macros = { path = "../plugin_macros" }
|
||||||
|
@ -12,4 +12,5 @@ syn = { version = "1.0", features = ["full", "extra-traits"] }
|
|||||||
quote = "1.0"
|
quote = "1.0"
|
||||||
proc-macro2 = "1.0"
|
proc-macro2 = "1.0"
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
bincode = "1.3"
|
bincode = "1.3"
|
||||||
|
@ -10,6 +10,7 @@ wasmtime-wasi = "0.38"
|
|||||||
wasi-common = "0.38"
|
wasi-common = "0.38"
|
||||||
anyhow = { version = "1.0", features = ["std"] }
|
anyhow = { version = "1.0", features = ["std"] }
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
bincode = "1.3"
|
bincode = "1.3"
|
||||||
pollster = "0.2.5"
|
pollster = "0.2.5"
|
||||||
|
@ -49,6 +49,7 @@ pulldown-cmark = { version = "0.9.1", default-features = false }
|
|||||||
rand = "0.8.3"
|
rand = "0.8.3"
|
||||||
regex = "1.5"
|
regex = "1.5"
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = { version = "1.0", features = ["preserve_order"] }
|
serde_json = { version = "1.0", features = ["preserve_order"] }
|
||||||
sha2 = "0.10"
|
sha2 = "0.10"
|
||||||
similar = "1.3"
|
similar = "1.3"
|
||||||
|
@ -27,6 +27,7 @@ prost = "0.8"
|
|||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
rsa = "0.4"
|
rsa = "0.4"
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
smol-timeout = "0.6"
|
smol-timeout = "0.6"
|
||||||
tracing = { version = "0.1.34", features = ["log"] }
|
tracing = { version = "0.1.34", features = ["log"] }
|
||||||
zstd = "0.11"
|
zstd = "0.11"
|
||||||
|
@ -24,6 +24,7 @@ futures = "0.3"
|
|||||||
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
||||||
postage = { version = "0.4.1", features = ["futures-traits"] }
|
postage = { version = "0.4.1", features = ["futures-traits"] }
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
smallvec = { version = "1.6", features = ["union"] }
|
smallvec = { version = "1.6", features = ["union"] }
|
||||||
smol = "1.2"
|
smol = "1.2"
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ json_comments = "0.2"
|
|||||||
postage = { version = "0.4.1", features = ["futures-traits"] }
|
postage = { version = "0.4.1", features = ["futures-traits"] }
|
||||||
schemars = "0.8"
|
schemars = "0.8"
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
serde_path_to_error = "0.1.4"
|
serde_path_to_error = "0.1.4"
|
||||||
toml = "0.5"
|
toml = "0.5"
|
||||||
|
@ -30,6 +30,7 @@ anyhow = "1"
|
|||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
|
@ -34,6 +34,7 @@ anyhow = "1"
|
|||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ anyhow = "1.0.38"
|
|||||||
indexmap = "1.6.2"
|
indexmap = "1.6.2"
|
||||||
parking_lot = "0.11.1"
|
parking_lot = "0.11.1"
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = { version = "1.0", features = ["preserve_order"] }
|
serde_json = { version = "1.0", features = ["preserve_order"] }
|
||||||
serde_path_to_error = "0.1.4"
|
serde_path_to_error = "0.1.4"
|
||||||
toml = "0.5"
|
toml = "0.5"
|
||||||
|
@ -2,6 +2,7 @@ use crate::{Theme, ThemeMeta};
|
|||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
use gpui::{fonts, AssetSource, FontCache};
|
use gpui::{fonts, AssetSource, FontCache};
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
use serde::Deserialize;
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
use std::{collections::HashMap, sync::Arc};
|
use std::{collections::HashMap, sync::Arc};
|
||||||
|
|
||||||
@ -56,12 +57,16 @@ impl ThemeRegistry {
|
|||||||
.with_context(|| format!("failed to load theme file {}", asset_path))?;
|
.with_context(|| format!("failed to load theme file {}", asset_path))?;
|
||||||
|
|
||||||
// Allocate into the heap directly, the Theme struct is too large to fit in the stack.
|
// Allocate into the heap directly, the Theme struct is too large to fit in the stack.
|
||||||
let mut theme: Arc<Theme> = fonts::with_font_cache(self.font_cache.clone(), || {
|
let mut theme = fonts::with_font_cache(self.font_cache.clone(), || {
|
||||||
serde_path_to_error::deserialize(&mut serde_json::Deserializer::from_slice(&theme_json))
|
let mut theme = Box::new(Theme::default());
|
||||||
|
let mut deserializer = serde_json::Deserializer::from_slice(&theme_json);
|
||||||
|
let result = Theme::deserialize_in_place(&mut deserializer, &mut theme);
|
||||||
|
result.map(|_| theme)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
// Reset name to be the file path, so that we can use it to access the stored themes
|
// Reset name to be the file path, so that we can use it to access the stored themes
|
||||||
Arc::get_mut(&mut theme).unwrap().meta.name = name.into();
|
theme.meta.name = name.into();
|
||||||
|
let theme: Arc<Theme> = theme.into();
|
||||||
self.themes.lock().insert(name.to_string(), theme.clone());
|
self.themes.lock().insert(name.to_string(), theme.clone());
|
||||||
Ok(theme)
|
Ok(theme)
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ neovim = ["nvim-rs", "async-compat", "async-trait", "tokio"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
itertools = "0.10"
|
itertools = "0.10"
|
||||||
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ log = { version = "0.4.16", features = ["kv_unstable_serde"] }
|
|||||||
parking_lot = "0.11.1"
|
parking_lot = "0.11.1"
|
||||||
postage = { version = "0.4.1", features = ["futures-traits"] }
|
postage = { version = "0.4.1", features = ["futures-traits"] }
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = { version = "1.0", features = ["preserve_order"] }
|
serde_json = { version = "1.0", features = ["preserve_order"] }
|
||||||
smallvec = { version = "1.6", features = ["union"] }
|
smallvec = { version = "1.6", features = ["union"] }
|
||||||
indoc = "1.0.4"
|
indoc = "1.0.4"
|
||||||
@ -57,4 +58,4 @@ gpui = { path = "../gpui", features = ["test-support"] }
|
|||||||
project = { path = "../project", features = ["test-support"] }
|
project = { path = "../project", features = ["test-support"] }
|
||||||
settings = { path = "../settings", features = ["test-support"] }
|
settings = { path = "../settings", features = ["test-support"] }
|
||||||
fs = { path = "../fs", features = ["test-support"] }
|
fs = { path = "../fs", features = ["test-support"] }
|
||||||
db = { path = "../db", features = ["test-support"] }
|
db = { path = "../db", features = ["test-support"] }
|
||||||
|
@ -88,6 +88,7 @@ regex = "1.5"
|
|||||||
rsa = "0.4"
|
rsa = "0.4"
|
||||||
rust-embed = { version = "6.3", features = ["include-exclude"] }
|
rust-embed = { version = "6.3", features = ["include-exclude"] }
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = { version = "1.0", features = ["preserve_order"] }
|
serde_json = { version = "1.0", features = ["preserve_order"] }
|
||||||
serde_path_to_error = "0.1.4"
|
serde_path_to_error = "0.1.4"
|
||||||
simplelog = "0.9"
|
simplelog = "0.9"
|
||||||
|
3
plugins/Cargo.lock
generated
3
plugins/Cargo.lock
generated
@ -23,6 +23,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"plugin",
|
"plugin",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -33,6 +34,7 @@ dependencies = [
|
|||||||
"bincode",
|
"bincode",
|
||||||
"plugin_macros",
|
"plugin_macros",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -43,6 +45,7 @@ dependencies = [
|
|||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_derive",
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ edition = "2021"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
plugin = { path = "../../crates/plugin" }
|
plugin = { path = "../../crates/plugin" }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
Loading…
Reference in New Issue
Block a user