Skip to content

Commit

Permalink
Remove unused deps (#2455)
Browse files Browse the repository at this point in the history
# Objective

Reduce compilation time

# Solution

Remove unused dependencies. While this PR doesn't remove any crates from `Cargo.lock`, it may unlock more build parallelism.
  • Loading branch information
bjorn3 committed Jul 14, 2021
1 parent d80303d commit 8c8584a
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 18 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords = ["bevy"]

[features]
trace = []
bevy_ci_testing = ["ron"]
bevy_ci_testing = ["serde", "ron"]
default = ["bevy_reflect"]

[dependencies]
Expand All @@ -25,7 +25,7 @@ bevy_reflect = { path = "../bevy_reflect", version = "0.5.0", optional = true }
bevy_utils = { path = "../bevy_utils", version = "0.5.0" }

# other
serde = { version = "1.0", features = ["derive"] }
serde = { version = "1.0", features = ["derive"], optional = true }
ron = { version = "0.6.2", optional = true }


Expand Down
1 change: 0 additions & 1 deletion crates/bevy_asset/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.5.0" }

# other
serde = { version = "1", features = ["derive"] }
ron = "0.6.2"
crossbeam-channel = "0.5.0"
anyhow = "1.0"
thiserror = "1.0"
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ proc-macro = true
bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.5.0" }

Inflector = { version = "0.11.4", default-features = false }
proc-macro2 = "1.0"
quote = "1.0"
syn = "1.0"
3 changes: 1 addition & 2 deletions crates/bevy_derive/src/shader_defs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use bevy_macro_utils::BevyManifest;
use inflector::Inflector;
use proc_macro::TokenStream;
use proc_macro2::Ident;
use quote::quote;
use syn::{parse_macro_input, Data, DataStruct, DeriveInput, Fields, Path};

Expand All @@ -27,7 +26,7 @@ pub fn derive_shader_defs(input: TokenStream) -> TokenStream {
.any(|a| *a.path.get_ident().as_ref().unwrap() == SHADER_DEF_ATTRIBUTE_NAME)
})
.map(|f| f.ident.as_ref().unwrap())
.collect::<Vec<&Ident>>();
.collect::<Vec<&syn::Ident>>();
let struct_name = &ast.ident;
let struct_name_pascal_case = ast.ident.to_string().to_pascal_case();
let shader_defs = shader_def_idents
Expand Down
3 changes: 0 additions & 3 deletions crates/bevy_diagnostic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ bevy_core = { path = "../bevy_core", version = "0.5.0" }
bevy_ecs = { path = "../bevy_ecs", version = "0.5.0" }
bevy_log = { path = "../bevy_log", version = "0.5.0" }
bevy_utils = { path = "../bevy_utils", version = "0.5.0" }

# other
parking_lot = "0.11.0"
5 changes: 3 additions & 2 deletions crates/bevy_ecs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ bevy_utils = { path = "../bevy_utils", version = "0.5.0" }
bevy_ecs_macros = { path = "macros", version = "0.5.0" }

async-channel = "1.4"
bitflags = "1.2"
fixedbitset = "0.4"
fxhash = "0.2"
thiserror = "1.0"
downcast-rs = "1.2"
parking_lot = "0.11"
rand = "0.8"
serde = "1"

[dev-dependencies]
parking_lot = "0.11"

[[example]]
name = "events"
path = "examples/events.rs"
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_macro_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ keywords = ["bevy"]

[dependencies]
cargo-manifest = "0.2.3"
proc-macro2 = "1.0"
syn = "1.0"
2 changes: 0 additions & 2 deletions crates/bevy_pbr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ keywords = ["bevy"]
bevy_app = { path = "../bevy_app", version = "0.5.0" }
bevy_asset = { path = "../bevy_asset", version = "0.5.0" }
bevy_core = { path = "../bevy_core", version = "0.5.0" }
bevy_derive = { path = "../bevy_derive", version = "0.5.0" }
bevy_ecs = { path = "../bevy_ecs", version = "0.5.0" }
bevy_math = { path = "../bevy_math", version = "0.5.0" }
bevy_reflect = { path = "../bevy_reflect", version = "0.5.0", features = ["bevy"] }
bevy_render = { path = "../bevy_render", version = "0.5.0" }
bevy_transform = { path = "../bevy_transform", version = "0.5.0" }
bevy_window = { path = "../bevy_window", version = "0.5.0" }

# other
# direct dependency required for derive macro
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_render/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ image = { version = "0.23.12", default-features = false }
# misc
serde = { version = "1", features = ["derive"] }
bitflags = "1.2.1"
smallvec = { version = "1.6", features = ["union", "const_generics"] }
once_cell = "1.4.1" # TODO: replace once_cell with std equivalent if/when this lands: https://github.com/rust-lang/rfcs/pull/2788
downcast-rs = "1.2.0"
thiserror = "1.0"
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_scene/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ ron = "0.6.2"
uuid = { version = "0.8", features = ["v4", "serde"] }
anyhow = "1.0"
thiserror = "1.0"
parking_lot = "0.11.0"
5 changes: 4 additions & 1 deletion crates/bevy_tasks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ futures-lite = "1.4.0"
event-listener = "2.4.0"
async-executor = "1.3.0"
async-channel = "1.4.2"
instant = { version = "0.1", features = ["wasm-bindgen"] }
num_cpus = "1"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4"

[dev-dependencies]
instant = { version = "0.1", features = ["wasm-bindgen"] }
1 change: 0 additions & 1 deletion crates/bevy_winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ x11 = ["winit/x11"]
bevy_app = { path = "../bevy_app", version = "0.5.0" }
bevy_ecs = { path = "../bevy_ecs", version = "0.5.0" }
bevy_input = { path = "../bevy_input", version = "0.5.0" }
bevy_log = { path = "../bevy_log", version = "0.5.0" }
bevy_math = { path = "../bevy_math", version = "0.5.0" }
bevy_window = { path = "../bevy_window", version = "0.5.0" }
bevy_utils = { path = "../bevy_utils", version = "0.5.0" }
Expand Down

0 comments on commit 8c8584a

Please sign in to comment.