extract file-download crate to remove solana-runtime dep from cargo-build-sbf#3460
Conversation
LucasSte
left a comment
There was a problem hiding this comment.
In general looks good. I just requested @joncinque's review, for I believe he is more familiar with this part of the code.
| pub use solana_file_downloader::DownloadProgressRecord; | ||
| use { | ||
| console::Emoji, | ||
| indicatif::{ProgressBar, ProgressStyle}, | ||
| log::*, | ||
| solana_file_downloader::{download_file, DownloadProgressCallbackOption}, |
There was a problem hiding this comment.
Can you merge the solana_file_downloader imports here?
There was a problem hiding this comment.
I want to re-export DownloadProgressRecord specifically because it's part of the public API via download_snapshot_archive. If it's not re-exported then solana_validator needs to add solana_file_downloader as a direct dependency to use DownloadProgressRecord in download_snapshot_archive
joncinque
left a comment
There was a problem hiding this comment.
This looks great, thanks for doing the work! The only thing I would ask is to put the new crate under sdk. That'll make it easier when splitting everything out of this repo.
Actually, with this change, are there any other dependencies from sdk crates into non-sdk crates? (All I see is frozen-abi, frozen-abi-macro, logger, define-syscall, short-vec, which can all definitely move into sdk)
|
Co-authored-by: Jon C <me@jonc.dev>
eac87bf to
5d07e22
Compare
Problem
cargo-build-sbf has a superfluous dependency on solana-runtime, which is a huge crate, via solana-download-utils.
Summary of Changes
move
solana_download_utils::download_fileto its own crate and use this new crate in cargo-build-sbf