Skip to content

Commit

Permalink
fix(workspace): Add Unused Dependency Lint (#453)
Browse files Browse the repository at this point in the history
* fix(workspace): add unused dep lint

* fix(workspace): add unused dep lint

* fix(executor): add unused crate warning

* fix: add unused dep check

* fix: add unused dep check
  • Loading branch information
refcell authored Aug 23, 2024
1 parent d1b63f8 commit 492c6e0
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 18 deletions.
6 changes: 0 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bin/host/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![warn(missing_debug_implementations, missing_docs, rustdoc::all)]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]

pub mod cli;
pub mod fetcher;
Expand Down
2 changes: 0 additions & 2 deletions bin/kt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ foundry-fork-db = "=0.2.0"
serde_json = { version = "1.0.117", default-features = false }
tracing-subscriber = "0.3.18"
tokio = { version = "1", features = ["full"] }
reqwest = "0.12"
futures = "0.3"
color-eyre = "0.6" # For op-test-vector dependency
clap = { version = "4", features = ["derive", "env"] }
op-test-vectors = { git = "https://github.com/ethereum-optimism/tests", branch = "main" }
Expand Down
8 changes: 8 additions & 0 deletions bin/kt/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
#![warn(missing_debug_implementations, missing_docs, rustdoc::all)]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]

// Temporarily pinned dependencies.
use foundry_fork_db as _;
use revm_inspectors as _;

// Used for op-test-vectors
use color_eyre as _;

use clap::Parser;
use kona_derive::types::{Blob, L2BlockInfo, L2PayloadAttributes, RollupConfig, SystemConfig};
Expand Down
5 changes: 0 additions & 5 deletions crates/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ revm = { workspace = true, optional = true }
kona-primitives = { path = "../primitives", version = "0.0.1" }

# External
alloy-sol-types = { version = "0.7.6", default-features = false }
hashbrown = "0.14.5"
unsigned-varint = "0.8.0"
miniz_oxide = "0.7.3"
Expand All @@ -44,8 +43,6 @@ sha2 = { version = "0.10.8", default-features = false, optional = true }
alloy-transport = { version = "0.2", default-features = false, optional = true }
alloy-provider = { version = "0.2", default-features = false, optional = true }
alloy-transport-http = { version = "0.2", optional = true }
alloy-rpc-types = { version = "0.2", default-features = false, optional = true }
serde_json = { version = "1.0.94", default-features = false, optional = true }
reqwest = { version = "0.12.4", default-features = false, optional = true }

# `metrics` feature dependencies
Expand Down Expand Up @@ -76,12 +73,10 @@ serde = [
]
metrics = ["dep:prometheus", "dep:lazy_static"]
online = [
"dep:serde_json",
"dep:revm",
"dep:c-kzg",
"dep:sha2",
"dep:alloy-provider",
"dep:alloy-rpc-types",
"dep:alloy-transport",
"dep:alloy-transport-http",
"dep:reqwest",
Expand Down
1 change: 1 addition & 0 deletions crates/derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(any(test, feature = "metrics")), no_std)]
#![cfg_attr(not(any(test, feature = "test-utils")), warn(unused_crate_dependencies))]

extern crate alloc;

Expand Down
2 changes: 1 addition & 1 deletion crates/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ homepage.workspace = true
anyhow.workspace = true
tracing.workspace = true
alloy-primitives = { workspace = true, features = ["rlp"] }
alloy-rlp.workspace = true
alloy-eips.workspace = true
alloy-consensus.workspace = true
op-alloy-consensus.workspace = true
Expand All @@ -24,6 +23,7 @@ kona-mpt = { path = "../mpt", version = "0.0.2" }
kona-derive = { path = "../derive", version = "0.0.2" }

[dev-dependencies]
alloy-rlp.workspace = true
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.117"
rand = "0.8.5"
Expand Down
1 change: 1 addition & 0 deletions crates/executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![warn(missing_debug_implementations, missing_docs, unreachable_pub, rustdoc::all)]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![no_std]

extern crate alloc;
Expand Down
1 change: 1 addition & 0 deletions crates/mpt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![warn(missing_debug_implementations, missing_docs, unreachable_pub, rustdoc::all)]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![no_std]

extern crate alloc;
Expand Down
1 change: 0 additions & 1 deletion crates/preimage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ homepage.workspace = true
[dependencies]
# workspace
anyhow.workspace = true
cfg-if.workspace = true
tracing.workspace = true
alloy-primitives.workspace = true
async-trait.workspace = true
Expand Down
1 change: 1 addition & 0 deletions crates/preimage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![warn(missing_debug_implementations, missing_docs, unreachable_pub, rustdoc::all)]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![no_std]

extern crate alloc;
Expand Down
3 changes: 0 additions & 3 deletions crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ op-alloy-consensus.workspace = true
# SCR Repo Primitives
superchain-primitives = { version = "0.2.2", default-features = false }

# Alloy Types
alloy-sol-types = { version = "0.7.6", default-features = false }

# `serde` feature dependencies
serde = { version = "1.0.203", default-features = false, features = ["derive"], optional = true }

Expand Down
1 change: 1 addition & 0 deletions crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#![warn(missing_debug_implementations, missing_docs, unreachable_pub, rustdoc::all)]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![no_std]

// Re-export superchain-primitives.
Expand Down

0 comments on commit 492c6e0

Please sign in to comment.