aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart-core/src/repository/downloader.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-10 23:58:26 +0900
committernsfisis <nsfisis@gmail.com>2026-05-10 23:58:26 +0900
commit8871b923fa3df1935c263db155cb8bc3d59705cd (patch)
tree4c080d383c30a0d92229f9b411f1d94976a6e707 /crates/mozart-core/src/repository/downloader.rs
parent59bab6efee41a196b0d9d392167c536abbe068ba (diff)
downloadphp-mozart-8871b923fa3df1935c263db155cb8bc3d59705cd.tar.gz
php-mozart-8871b923fa3df1935c263db155cb8bc3d59705cd.tar.zst
php-mozart-8871b923fa3df1935c263db155cb8bc3d59705cd.zip
refactor(downloader): turn DownloadManager into downloader registry
Reshape DownloadManager from a hard-coded VCS match into a registry of DownloaderInterface instances keyed by source type, mirroring Composer's DownloadManager — with prefer-source/dist preferences, an IO handle, and a files cache. ArchiveManager now resolves dist sources through a shared DownloadManager instead of calling download_dist directly, and Composer::require / try_load take an IO so it flows through the factory wiring.
Diffstat (limited to 'crates/mozart-core/src/repository/downloader.rs')
-rw-r--r--crates/mozart-core/src/repository/downloader.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/mozart-core/src/repository/downloader.rs b/crates/mozart-core/src/repository/downloader.rs
index 56b3652..f2e33a7 100644
--- a/crates/mozart-core/src/repository/downloader.rs
+++ b/crates/mozart-core/src/repository/downloader.rs
@@ -80,7 +80,7 @@ impl DownloadProgress {
/// Downloaded bytes are cached by URL in `files_cache`; cache hits skip the network request
/// entirely.
#[tracing::instrument(skip(expected_shasum, progress, files_cache))]
-pub async fn download_dist(
+pub(crate) async fn download_dist(
url: &str,
expected_shasum: Option<&str>,
progress: Option<&mut DownloadProgress>,