Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Maintenance : simplify a few patterns, remove unneeded dependencies #8137

Merged
merged 5 commits into from
Feb 6, 2020

Conversation

huitseeker
Copy link
Contributor

Opinions on the refactorings loosely held -> happy to accomodate in review

Problem

Summary of Changes

Fixes #

Copy link
Contributor

@garious garious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, that filter merging will probably have a positive performance impact. Need Rust to implement this: http://fun.cs.tufts.edu/stream-fusion.pdf

Only suggestion is generally to prefer the ? on Option instead of using map or and_then.

bench-exchange/Cargo.toml Outdated Show resolved Hide resolved
crate-features/Cargo.toml Outdated Show resolved Hide resolved
runtime/src/accounts_index.rs Outdated Show resolved Hide resolved
@garious garious added the CI Pull Request is ready to enter CI label Feb 5, 2020
@solana-grimes solana-grimes removed the CI Pull Request is ready to enter CI label Feb 5, 2020
@garious garious added the CI Pull Request is ready to enter CI label Feb 6, 2020
@solana-grimes solana-grimes removed the CI Pull Request is ready to enter CI label Feb 6, 2020
@garious
Copy link
Contributor

garious commented Feb 6, 2020

Can you run the build, such that the updated Cargo.lock is included in this PR?

 net-shaper: Removing log, semver, serde_derive
 bench-tps: Removing serde, serde_derive
 banking-bench: Removing solana
 ledger-tool: Removing bincode, serde, serde_derive
 librapay: Removing solana, language_e2e_tests
 log-analyzer: Removing log, semver, serde_derive
 exchange: Removing solana
 core: Removing crc, memmap, symlink, untrusted
 perf: Removing serde_derive
 genesis: Removing hex, serde_derive
 sdk-c: Removing sha2
 sys-tuner: Removing semver
 bench-exchange: Removing bincode, bs58, env_logger, serde, serde_derive, untrusted, ws
 btc_spv_bin: Removing serde_json
 btc_spv: Removing chrono
 bpf_loader: Removing serde
 ledger: Removing dlopen, dlopen_derive, serde_derive
 move_loader: Removing byteorder, libc, language_e2e_tests
 ownable: Removing serde, serde_derive
 client: Removing rand
 archiver-utils: Removing rand_chacha
 validator: Removing serde_json, tempfile
 param_passing_dep: Removing solana
 failure: Removing log
 vest: Removing log
 vote-signer: Removing bs58, serde
 local-cluster: Removing symlink
 keygen: Removing rpassword
 install: Removing bs58, log
 upload-perf: Removing log
 runtime: Removing serde_json
 stake: Removing rand
@garious garious added the CI Pull Request is ready to enter CI label Feb 6, 2020
@solana-grimes solana-grimes removed the CI Pull Request is ready to enter CI label Feb 6, 2020
@garious garious added the CI Pull Request is ready to enter CI label Feb 6, 2020
@solana-grimes solana-grimes removed the CI Pull Request is ready to enter CI label Feb 6, 2020
@garious
Copy link
Contributor

garious commented Feb 6, 2020

Got a tool that spotted all the redundant crate dependencies?

@huitseeker
Copy link
Contributor Author

@garious Nope. I literally brute-forced them (remove one, try to see if it still works ..).

@codecov
Copy link

codecov bot commented Feb 6, 2020

Codecov Report

Merging #8137 into master will increase coverage by <.1%.
The diff coverage is 81.2%.

@@           Coverage Diff            @@
##           master   #8137     +/-   ##
========================================
+ Coverage      82%     82%   +<.1%     
========================================
  Files         249     249             
  Lines       53542   53530     -12     
========================================
- Hits        43916   43912      -4     
+ Misses       9626    9618      -8

@garious garious merged commit f016c9a into solana-labs:master Feb 6, 2020
@garious
Copy link
Contributor

garious commented Feb 6, 2020

Thanks so much @huitseeker! A wonderful contribution!

@jackcmay
Copy link
Contributor

jackcmay commented Feb 6, 2020

Lots of great cleanup, thanks!

@ryoqun
Copy link
Contributor

ryoqun commented Feb 11, 2020

@garious Nope. I literally brute-forced them (remove one, try to see if it still works ..).

@huitseeker Nice work! I'm pretty amazed by such a great hard manual work. :)

@huitseeker
Copy link
Contributor Author

@ryoqun oh, I scripted the trial-and error, but that's just a couple lines of bash, and what you'd come up with is as good as what I did. Let me know if you want me to post this as a gist.

@ryoqun ryoqun mentioned this pull request Apr 24, 2023
@ryoqun
Copy link
Contributor

ryoqun commented Apr 24, 2023

I wish there was a clippy lint for unused dependencies. :-/

@mvines there is https://crates.io/crates/cargo-udeps but I've found its workspace and feature support lacking

dreams comes true: #31320

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

Successfully merging this pull request may close these issues.

6 participants