Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary dependencies brought in by substrate upgrade #3399

Open
1 of 20 tasks
teor2345 opened this issue Feb 20, 2025 · 1 comment
Open
1 of 20 tasks

Remove unnecessary dependencies brought in by substrate upgrade #3399

teor2345 opened this issue Feb 20, 2025 · 1 comment
Labels

Comments

@teor2345
Copy link
Member

teor2345 commented Feb 20, 2025

PR #3394 added significant number of new dependencies, which appear to be duplicate or unnecessary.

We need to:

  1. check if each dependency is actually used (cargo tree or cargo check)
  2. see if we can disable it by patching our fork, upgrading our direct dependencies, or disabling features
  3. submit those patches to upstream if needed

Possibly unnecessary dependencies:

  • cumulus*
  • kvdb-rocksdb, which I think brings in: bindgen, cexpr, clang-sys, cxx, cxx-build, librocksdb-sys, rocksdb, bzip2, libz-sys, ruzstd

From PR #3404:

  • icu_collections, which brings in: icu_normalizer, icu_provider_macros, icu_properties* , icu_locid*, litemap, tinystr, utf8_iter, yoke, yoke-derive, zerofrom*, zerovec*
    • specifically, utf16_iter, write16, and most of the ICU properties (if they have features) shouldn't be needed for UTF-8 DNS handling

Duplicate dependencies:

  • frame-metadata (x3)
  • itertools (x3 -> x4)
  • jsonrpsee* (x3)
  • keccak vs keccak-hash
  • libp2p*
  • primitive-types
  • prost*
  • secp256k1*
  • security-framework*, which probably brings in: core-foundation
  • smol
  • soketto
  • sp-crypto-hashing (different git sources?)
  • subtle
  • tokio-rustls
  • unicode-width
  • windows-sys: which brings in: windows-targets (x4, existing duplicates, probably one of the causes of slow Windows builds)

Note: cargo metadata and tools that use it are unreliable, because of rust-lang/cargo#10801

@nazar-pc
Copy link
Member

libp2p duplicate can finally be resolved by switching out patched version to libp2p/rust-libp2p#5692 which minimizes API breakage comparing to the version I had prior to this. At least temporarily, Substrate is again behind with libp2p 0.55.0 release a few weeks ago and who knows when it will be upgraded there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants