Skip to content

Commit

Permalink
build: prune unused dependencies (#19885)
Browse files Browse the repository at this point in the history
Signed-off-by: xxchan <[email protected]>
  • Loading branch information
xxchan authored Dec 23, 2024
1 parent a175600 commit e70eb59
Show file tree
Hide file tree
Showing 69 changed files with 44 additions and 623 deletions.
166 changes: 3 additions & 163 deletions Cargo.lock

Large diffs are not rendered by default.

19 changes: 14 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ keywords = ["sql", "database", "streaming"]
license = "Apache-2.0"
repository = "https://github.com/risingwavelabs/risingwave"

# some dependencies are not worth deleting.
[workspace.metadata.cargo-machete]
ignored = [
"workspace-hack",
"expect-test",
"pretty_assertions",
"serde",
"serde_json",
]
[workspace.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]
development = ["expect-test", "pretty_assertions"]

[workspace.dependencies]
foyer = { version = "0.13.1", features = ["tracing", "nightly", "prometheus"] }
apache-avro = { git = "https://github.com/risingwavelabs/avro", rev = "25113ba88234a9ae23296e981d8302c290fdaa4b", features = [
Expand Down Expand Up @@ -107,11 +120,6 @@ aws-sdk-s3 = { version = "1", default-features = false, features = [
"rt-tokio",
"rustls",
] }
# To bump the version of aws-sdk-ec2, check the README of https://github.com/risingwavelabs/rw-aws-sdk-ec2
aws-sdk-ec2 = { package = "rw-aws-sdk-ec2", version = "1", default-features = false, features = [
"rt-tokio",
"rustls",
] }
aws-sdk-sqs = { version = "1", default-features = false, features = [
"rt-tokio",
"rustls",
Expand Down Expand Up @@ -204,6 +212,7 @@ tokio-stream = { git = "https://github.com/madsim-rs/tokio.git", rev = "0dd1055"
tokio-util = "0.7"
tracing-opentelemetry = "0.25"
rand = { version = "0.8", features = ["small_rng"] }
governor = { version = "0.6", default-features = false, features = ["std"] }
risingwave_backup = { path = "./src/storage/backup" }
risingwave_batch = { path = "./src/batch" }
risingwave_batch_executors = { path = "./src/batch/executors" }
Expand Down
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ script = """
echo "Running $(tput setaf 4)cargo udeps$(tput sgr0) checks"
cargo udeps --workspace --all-targets ${RISINGWAVE_FEATURE_FLAGS} --exclude workspace-hack --exclude risingwave_bench --exclude risingwave_udf --exclude risingwave_simulation
cargo udeps --workspace --all-targets ${RISINGWAVE_FEATURE_FLAGS} --exclude workspace-hack --exclude risingwave_bench --exclude risingwave_simulation
"""

[tasks.check-trailing-spaces]
Expand Down
4 changes: 3 additions & 1 deletion ci/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export RUST_MIN_STACK=4194304
unset LANG

function dump_diagnose_info() {
./risedev diagnose || true
if [ -f .risingwave/config/risedev-env ]; then
./risedev diagnose || true
fi
}
trap dump_diagnose_info EXIT

Expand Down
4 changes: 0 additions & 4 deletions integration_tests/feature-store/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
sqlx = { version = "0.8", features = ["runtime-tokio-native-tls", "postgres"] }
tokio = { version = "1", features = ["full"] }
tonic = "0.11.0"
reqwest = { version = "0.11", features = ["blocking"] }
rdkafka = { version = "0.34", features = ["cmake-build"] }
serde_json = "1.0"
prost = "0.12"
clap = "4.4.6"
tokio-postgres = "0.7.10"
tonic-build = "0.11.0"

[build-dependencies]
tonic-build = "0.11.0"
Expand Down
2 changes: 0 additions & 2 deletions integration_tests/feature-store/simulator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ edition = "2021"
[dependencies]
tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread"] }
tonic = "0.11.0"
reqwest = { version = "0.11" }
serde_json = "1.0"
serde_derive = "1.0"
rand = { workspace = true }
clap = "4.4.6"
prost = "0.12"
serde = { version = "1", features = ["derive"] }
futures = "0.3.28"
csv = "1.3.0"
8 changes: 0 additions & 8 deletions src/batch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ keywords = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
anyhow = "1"
async-recursion = "1"
Expand Down Expand Up @@ -62,11 +56,9 @@ twox-hash = "2"
workspace-hack = { path = "../workspace-hack" }

[dev-dependencies]
criterion = { workspace = true, features = ["async_tokio", "async"] }
rand = { workspace = true }
risingwave_hummock_sdk = { workspace = true }
tempfile = "3"
tikv-jemallocator = { workspace = true }

[lints]
workspace = true
6 changes: 0 additions & 6 deletions src/batch/executors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ keywords = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
anyhow = "1"
assert_matches = "1"
Expand Down
1 change: 0 additions & 1 deletion src/cmd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ normal = ["workspace-hack", "workspace-config", "task_stats_alloc"]

[dependencies]
clap = { workspace = true }
prometheus = { version = "0.13" }
risingwave_batch_executors = { workspace = true }
risingwave_common = { workspace = true }
risingwave_compactor = { workspace = true }
Expand Down
6 changes: 2 additions & 4 deletions src/cmd_all/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,16 @@ js-udf = ["risingwave_expr_impl/js-udf"]
python-udf = ["risingwave_expr_impl/python-udf"]

[package.metadata.cargo-machete]
ignored = ["workspace-hack", "workspace-config", "task_stats_alloc"]
ignored = ["workspace-hack", "workspace-config", "task_stats_alloc", "tikv-jemallocator"]

[package.metadata.cargo-udeps.ignore]
ignored = ["workspace-hack", "workspace-config", "task_stats_alloc"]
ignored = ["workspace-hack", "workspace-config", "task_stats_alloc", "tikv-jemallocator"]

[dependencies]
anyhow = "1"
clap = { workspace = true }
console = "0.15"
const-str = "0.5"
home = "0.5"
prometheus = { version = "0.13" }
risingwave_batch_executors = { workspace = true }
risingwave_cmd = { workspace = true }
risingwave_common = { workspace = true }
Expand Down
9 changes: 1 addition & 8 deletions src/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ keywords = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
ahash = "0.8"
anyhow = "1"
Expand Down Expand Up @@ -48,12 +42,11 @@ ethnum = { version = "1", features = ["serde"] }
fixedbitset = "0.5"
foyer = { workspace = true }
futures = { version = "0.3", default-features = false, features = ["alloc"] }
governor = { version = "0.6", default-features = false, features = ["std"] }
governor = { workspace = true }
hashbrown = "0.14"
hex = "0.4.3"
http = "1"
humantime = "2.1"
hytra = { workspace = true }
itertools = { workspace = true }
itoa = "1.0"
jsonbb = { workspace = true }
Expand Down
6 changes: 0 additions & 6 deletions src/common/common_service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ license = { workspace = true }
repository = { workspace = true }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
async-trait = "0.1"
axum = { workspace = true }
Expand Down
7 changes: 0 additions & 7 deletions src/common/estimate_size/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,12 @@ license = { workspace = true }
repository = { workspace = true }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
bytes = "1"
educe = "0.6"
ethnum = { version = "1", features = ["serde"] }
fixedbitset = "0.5"
jsonbb = { workspace = true }
lru = { workspace = true }
risingwave_common_proc_macro = { workspace = true }
rust_decimal = "1"
serde_json = "1"
Expand Down
7 changes: 0 additions & 7 deletions src/common/heap_profiling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@ license = { workspace = true }
repository = { workspace = true }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
anyhow = "1"
chrono = { version = "0.4", default-features = false, features = [
"clock",
"std",
Expand Down
6 changes: 0 additions & 6 deletions src/common/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ license = { workspace = true }
repository = { workspace = true }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
auto_impl = "1"
bytes = "1"
Expand Down
6 changes: 2 additions & 4 deletions src/common/proc_macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ repository = { workspace = true }
[lib]
proc-macro = true

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]



[dependencies]
proc-macro-error = "1.0"
Expand Down
5 changes: 0 additions & 5 deletions src/common/secret/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ keywords = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
aes-gcm = "0.10"
Expand Down
8 changes: 0 additions & 8 deletions src/common/telemetry_event/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,11 @@ keywords = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
jsonbb = { workspace = true }
prost = { workspace = true }
reqwest = { version = "0.12.2", features = ["json"] }
risingwave_pb = { workspace = true }
thiserror = "1"
thiserror-ext = { workspace = true }
tokio = { version = "0.2", package = "madsim-tokio", features = [
"rt",
Expand All @@ -29,4 +22,3 @@ tokio = { version = "0.2", package = "madsim-tokio", features = [
"signal",
] }
tracing = "0.1"
uuid = { version = "1", features = ["v4"] }
8 changes: 0 additions & 8 deletions src/compute/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ keywords = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
anyhow = "1"
async-trait = "0.1"
Expand All @@ -24,7 +18,6 @@ foyer = { workspace = true }
futures = { version = "0.3", default-features = false, features = ["alloc"] }
futures-async-stream = { workspace = true }
http = "1"
hyper = "1"
itertools = { workspace = true }
maplit = "1.0.2"
pprof = { version = "0.14", features = ["flamegraph"] }
Expand Down Expand Up @@ -60,7 +53,6 @@ tokio-stream = { workspace = true }
tonic = { workspace = true }
tower = { version = "0.5", features = ["util", "load-shed"] }
tracing = "0.1"
uuid = { version = "1.11.0", features = ["v4"] }

[target.'cfg(not(madsim))'.dependencies]
workspace-hack = { path = "../workspace-hack" }
Expand Down
16 changes: 1 addition & 15 deletions src/connector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ keywords = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
anyhow = "1"
apache-avro = { workspace = true }
Expand Down Expand Up @@ -61,21 +55,14 @@ google-cloud-bigquery = { version = "0.13.0", features = ["auth"] }
google-cloud-gax = "0.19.0"
google-cloud-googleapis = { version = "0.15", features = ["pubsub", "bigquery"] }
google-cloud-pubsub = "0.29"
governor = { version = "0.6", default-features = false, features = [
"std",
"dashmap",
"jitter",
] }
http = "0.2"
governor = { workspace = true }
iceberg = { workspace = true }
iceberg-catalog-glue = { workspace = true }
iceberg-catalog-rest = { workspace = true }
icelake = { workspace = true }
indexmap = { version = "2.7.0", features = ["serde"] }
itertools = { workspace = true }
jni = { version = "0.21.1", features = ["invocation"] }
jsonbb = { workspace = true }
jsonwebtoken = "9.2.0"
maplit = "1.0.2"
moka = { version = "0.12.8", features = ["future"] }
mongodb = { version = "2.8.2", features = ["tokio-runtime"] }
Expand Down Expand Up @@ -125,7 +112,6 @@ risingwave_common = { workspace = true }
risingwave_common_estimate_size = { workspace = true }
risingwave_connector_codec = { workspace = true }
risingwave_jni_core = { workspace = true }
risingwave_object_store = { workspace = true }
risingwave_pb = { workspace = true }
risingwave_rpc_client = { workspace = true }
rumqttc = { version = "0.24.0", features = ["url"] }
Expand Down
6 changes: 0 additions & 6 deletions src/connector/codec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ keywords = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[package.metadata.cargo-machete]
ignored = ["workspace-hack"]

[package.metadata.cargo-udeps.ignore]
normal = ["workspace-hack"]

[dependencies]
anyhow = "1"
apache-avro = { workspace = true }
Expand Down
Loading

0 comments on commit e70eb59

Please sign in to comment.