From c5bcf222f98d13b104231713bf4a0aa0833c420a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 5 Jun 2026 00:50:47 +0900 Subject: feat(downloader): wire VcsDownloader subclasses via shared downloaders Share downloaders as Rc> in DownloadManager and make DownloaderInterface/VcsDownloader take &mut self, matching PHP's mutable-by-reference downloader objects. This lets Git/Svn/Hg/Fossil/Perforce implement VcsDownloader and route download/install/update/prepare/cleanup through the trait instead of todo!(), and wires the as_* downcast hooks end-to-end. ChangeReportInterface::get_local_changes becomes &mut self since FileDownloader downloads to a compare dir; get_commit_logs/reapply_changes gain &mut self / Result to match the concrete implementations. Co-Authored-By: Claude Opus 4.8 --- crates/shirabe/src/downloader/change_report_interface.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe/src/downloader/change_report_interface.rs') diff --git a/crates/shirabe/src/downloader/change_report_interface.rs b/crates/shirabe/src/downloader/change_report_interface.rs index 5e770f7..718b2c1 100644 --- a/crates/shirabe/src/downloader/change_report_interface.rs +++ b/crates/shirabe/src/downloader/change_report_interface.rs @@ -6,7 +6,7 @@ use crate::package::PackageInterfaceHandle; pub trait ChangeReportInterface { fn get_local_changes( - &self, + &mut self, package: PackageInterfaceHandle, path: &str, ) -> Result>; -- cgit v1.3.1