Skip to content

Commit 8cd4dd7

Browse files
committed
fix: cyclic dependency for gloo-net websocket feature
* remove the deprecated `wasm-bindgen/serde-serialize` * mark `gloo-utils/serde` optional under `json` * enable `serde/derive` only for testing
1 parent 5864ac1 commit 8cd4dd7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

crates/net/Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ rustdoc-args = ["--cfg", "docsrs"]
1818
wasm-bindgen = "0.2"
1919
web-sys = "0.3"
2020
js-sys = "0.3"
21-
gloo-utils = { version = "0.1", path = "../utils", features = ["serde"] }
2221

2322
wasm-bindgen-futures = "0.4"
2423
futures-core = { version = "0.3", optional = true }
2524
futures-sink = { version = "0.3", optional = true }
2625

2726
thiserror = "1.0"
2827

29-
serde = { version = "1.0", features = ["derive"], optional = true }
28+
gloo-utils = { version = "0.1", path = "../utils", default-features = false, optional = true }
29+
serde = { version = "1.0", optional = true }
3030
serde_json = { version = "1.0", optional = true }
3131

3232
futures-channel = { version = "0.3", optional = true }
@@ -35,12 +35,13 @@ pin-project = { version = "1.0", optional = true }
3535
[dev-dependencies]
3636
wasm-bindgen-test = "0.3"
3737
futures = "0.3"
38+
serde = { version = "1.0", features = ["derive"] }
3839

3940
[features]
4041
default = ["json", "websocket", "http", "eventsource"]
4142

4243
# Enables `.json()` on `Response`
43-
json = ["serde", "serde_json"]
44+
json = ["serde", "serde_json", "gloo-utils/serde"]
4445
# Enables the WebSocket API
4546
websocket = [
4647
'web-sys/WebSocket',
@@ -52,11 +53,9 @@ websocket = [
5253
'web-sys/BinaryType',
5354
'web-sys/Blob',
5455
"futures-channel",
55-
"pin-project",
5656
"futures-core",
5757
"futures-sink",
58-
"wasm-bindgen/serde-serialize",
59-
"serde",
58+
"pin-project",
6059
]
6160
# Enables the HTTP API
6261
http = [

0 commit comments

Comments
 (0)