Skip to content

Commit cfd657b

Browse files
committed
Disable godot-fmt benchmark; its criterion pulls in too many dependencies although never used
Can be manually re-enabled. Unfortunately, Cargo doesn't offer optional dev-dependencies. Also remove unused serde_json dependency.
1 parent d725123 commit cfd657b

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

godot-core/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ serde = { version = "1", features = ["derive"], optional = true }
3131
# Reverse dev dependencies so doctests can use `godot::` prefix
3232
[dev-dependencies]
3333
godot = { path = "../godot" }
34-
serde_json = "1.0"
3534

3635
[build-dependencies]
3736
godot-bindings = { path = "../godot-bindings" }

godot-fmt/Cargo.toml

+9-5
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ edition = "2021"
88
[dependencies]
99
proc-macro2 = "1"
1010

11-
[dev-dependencies]
12-
criterion = "0.3"
1311

14-
[[bench]]
15-
name = "gdext_bench"
16-
harness = false
12+
# Disabled below, since it pulls in too many dependencies during `cargo test` but is not really used.
13+
# Dev-dependencies cannot be optional and feature-gated. Enable manually when needed.
14+
15+
#[[bench]]
16+
#name = "gdext_bench"
17+
#harness = false
18+
#
19+
#[dev-dependencies]
20+
#criterion = "0.5"

godot-fmt/benches/gdext_bench.rs

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
55
*/
66

7+
// IMPORTANT: to enable this benchmark, uncomment the corresponding lines in Cargo.toml.
8+
// Also disable clippy lints, as they run unconditionally.
9+
#![allow(clippy::all)]
10+
711
use std::{path::PathBuf, str::FromStr};
812

913
use criterion::{black_box, criterion_group, criterion_main, Criterion};

0 commit comments

Comments
 (0)