Skip to content

Conversation

@bbb651
Copy link
Contributor

@bbb651 bbb651 commented Nov 6, 2025

The main motivation is trying to resolve many heavy duplicated dependencies e.g. tokio, sqlx-core, sqlx-postgres, serde_core, axum, unfortunately it didn't seem to really work, what is really odd is that they all (except axum) seem to be using the same version and subset of each other's features which contradicts my mental modal of cargo.
I merged all [dependencies], and then tries to merge

I experimented with different things:

  • I added tokio without features to the workspace dependencies and then added the features explicitly to the dependencies in the crate, which seems better and probably should be done for all dependencies (and would avoid unnecessary features of dependencies when only using some of the crates in the workspace), see: Poor interaction between workspace dependencies and default-features rust-lang/cargo#12162 (comment)
  • I tried removing this tokio.features = ["all"] which seems unnecessary by roughly guessing the features and seeing the errors and it seemed to work first try, but now that I think about it it's probably just using the shared tokio dependency and is probably missing some features
  • Upgrading console-subscriber to 0.5.0 removed the duplicated axum dependency and massively reduced compile time from ~1m to ~37s
  • I needed to remove librqbit-sha1-wrapper.default-features = false for it to pick the default backend and compile, not sure how it worked before

(P.S. I also sorted the dependencies but with vim :sort which doesn't match cargo notion of sorting with things like cargo add because of the order of some special characters like - and _)

bbb651 added a commit to bbb651/rqbit that referenced this pull request Nov 8, 2025
This removes the duplicate axum dependency. See ikatson#512.
@ikatson
Copy link
Owner

ikatson commented Nov 22, 2025

Thanks for working on this!

Upgrading console-subscriber to 0.5.0 removed the duplicated axum dependency and massively reduced compile time from ~1m to ~37s

console-subscriber is an optional depdendency afaiu though, so it shouldn't have mattered?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants