From 3e367f78eec3521106979461fda717926717515a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 2 Aug 2026 08:42:53 +0900 Subject: fix(downloader): restore late binding in getLocalChanges/update paths PHP's FileDownloader::getLocalChanges and ::update call $this->download() / $this->install() / $this->remove() / $this->getInstallOperationAppendix(), which late-bind to the concrete downloader class. The Rust port embeds the parent as `inner`, so delegating these methods to FileDownloader pinned the calls to FileDownloader's own implementations: `status` built the compare tree without extracting the archive (flagging every file of dist-installed packages as changed), and `update` re-installed the raw dist file instead of extracting it. Thread the concrete downloader in as `this: &dyn DownloaderInterface` via shared helpers (base_get_local_changes / base_update) and pass `self` from each delegating downloader. Co-Authored-By: Claude Fable 5 --- crates/shirabe/src/downloader/path_downloader.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/downloader/path_downloader.rs') diff --git a/crates/shirabe/src/downloader/path_downloader.rs b/crates/shirabe/src/downloader/path_downloader.rs index 1f5498ad..72b77fc1 100644 --- a/crates/shirabe/src/downloader/path_downloader.rs +++ b/crates/shirabe/src/downloader/path_downloader.rs @@ -213,7 +213,7 @@ impl crate::downloader::ChangeReportInterface for PathDownloader { package: PackageInterfaceHandle, path: &str, ) -> anyhow::Result> { - self.inner.get_local_changes(package, path) + self.inner.base_get_local_changes(self, package, path) } } @@ -493,7 +493,10 @@ impl DownloaderInterface for PathDownloader { target: PackageInterfaceHandle, path: &str, ) -> anyhow::Result> { - self.inner.update(initial, target, path).await + let appendix = self.get_install_operation_appendix(target.clone(), path)?; + self.inner + .base_update(self, &appendix, initial, target, path) + .await } async fn remove( -- cgit v1.3.1