zed/crates/settings/Cargo.toml
Piotr Osiewicz 2a3c660d1f
settings: accept trailing commas (#2606)
Z-2357

I've found a crate that handles both comments and trailing commas in
JSON. It is a fork of `serde_json`, but it is maintained & up-to-date.
Sadly RawValue seems to not play nicely with it; I've ran into
deserialisation issues around use of RawValue. For this PR I've migrated
to `Value` API.

Obviously this is just a point of discussion, not something I'd merge
straight away. There may be better solutions to this particular problem.

I've also noticed that `serde_json_lenient` does not handle trailing
commas after bindings array. I'm not sure how big of an issue that is.

Release Notes:
- Improved handling of trailing commas in settings files.
[#1322](https://github.com/zed-industries/community/issues/1322)
2023-06-19 18:29:03 +02:00

42 lines
1 KiB
TOML

[package]
name = "settings"
version = "0.1.0"
edition = "2021"
publish = false
[lib]
path = "src/settings.rs"
doctest = false
[features]
test-support = ["gpui/test-support", "fs/test-support"]
[dependencies]
collections = { path = "../collections" }
gpui = { path = "../gpui" }
sqlez = { path = "../sqlez" }
fs = { path = "../fs" }
staff_mode = { path = "../staff_mode" }
util = { path = "../util" }
anyhow.workspace = true
futures.workspace = true
serde_json_lenient = {version = "0.1", features = ["preserve_order", "raw_value"]}
lazy_static.workspace = true
postage.workspace = true
rust-embed.workspace = true
schemars.workspace = true
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
smallvec.workspace = true
toml.workspace = true
tree-sitter.workspace = true
tree-sitter-json = "*"
[dev-dependencies]
gpui = { path = "../gpui", features = ["test-support"] }
fs = { path = "../fs", features = ["test-support"] }
indoc.workspace = true
pretty_assertions = "1.3.0"
unindent.workspace = true