diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-07 18:26:55 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-07 18:28:13 +0900 |
| commit | b8a50e25aafb51a6d73f9695362854cc5ed58117 (patch) | |
| tree | abe43c770cbf652a5e723c6f9a37e9406c5dd52e /crates/shirabe/src/downloader | |
| parent | da6f05c12d08ac96b4286664cd8205d3fee042d8 (diff) | |
| download | php-shirabe-b8a50e25aafb51a6d73f9695362854cc5ed58117.tar.gz php-shirabe-b8a50e25aafb51a6d73f9695362854cc5ed58117.tar.zst php-shirabe-b8a50e25aafb51a6d73f9695362854cc5ed58117.zip | |
feat(phase-c): resolve &mut-access phase-b TODOs via handle setters
PHP mutator methods that the Phase B port could not call because only
&self / &dyn / Rc access was available. Resolved by the interior-mutation
APIs that already exist: handle &self setters (set_dist/source_reference,
set_requires/dev/references/stability_flags), Rc<RefCell<dyn InputInterface>>
.borrow_mut(), and get_installation_manager().borrow_mut() (build_package_map
passes an empty/canonical package list per upstream). composer.get_package()
returns &RootPackageInterfaceHandle, so the "&dyn" Phase B note was wrong.
factory's set_config_source/set_auth_config_source were already live code;
their stale TODOs are removed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/downloader')
| -rw-r--r-- | crates/shirabe/src/downloader/git_downloader.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/crates/shirabe/src/downloader/git_downloader.rs b/crates/shirabe/src/downloader/git_downloader.rs index 078ac3a..7dace1b 100644 --- a/crates/shirabe/src/downloader/git_downloader.rs +++ b/crates/shirabe/src/downloader/git_downloader.rs @@ -1000,11 +1000,9 @@ impl VcsDownloader for GitDownloader { self.update_to_commit(package.clone(), &path, &r#ref, &pretty_version)? { if package.get_dist_reference() == package.get_source_reference() { - // TODO(phase-b): set_dist_reference requires &mut PackageInterface - // package.set_dist_reference(Some(new_ref.clone())); + package.set_dist_reference(Some(new_ref.clone())); } - // package.set_source_reference(Some(new_ref)); - let _ = new_ref; + package.set_source_reference(Some(new_ref)); } Ok(None) @@ -1125,11 +1123,9 @@ impl VcsDownloader for GitDownloader { self.update_to_commit(target.clone(), &path, &r#ref, &pretty_version)? { if target.get_dist_reference() == target.get_source_reference() { - // TODO(phase-b): set_dist_reference requires &mut PackageInterface - // target.set_dist_reference(Some(new_ref.clone())); + target.set_dist_reference(Some(new_ref.clone())); } - // target.set_source_reference(Some(new_ref)); - let _ = new_ref; + target.set_source_reference(Some(new_ref)); } let mut update_origin_url = false; |
