aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/show_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-29 03:42:14 +0900
committernsfisis <nsfisis@gmail.com>2026-05-29 03:42:14 +0900
commit86fcc80b348a3f00ab81e5447924aa10202d95e8 (patch)
tree0bdb4f7bd11aab799230a97500a380401a93b77e /crates/shirabe/src/command/show_command.rs
parent7f83e785a77fbdbcada9c6714703d4e5801af82a (diff)
downloadphp-shirabe-86fcc80b348a3f00ab81e5447924aa10202d95e8.tar.gz
php-shirabe-86fcc80b348a3f00ab81e5447924aa10202d95e8.tar.zst
php-shirabe-86fcc80b348a3f00ab81e5447924aa10202d95e8.zip
refactor(repository): introduce typed LockArrayRepositoryHandle
Share LockArrayRepository via Rc<RefCell<_>> while preserving the PHP ?LockArrayRepository type strength: Request.locked_repository, Locker ::get_locked_repository, and the installer create_* helpers now thread the typed handle instead of an owned LockArrayRepository, and pool builder identity check becomes a strict ptr_eq via widening into RepositoryInterfaceHandle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/show_command.rs')
-rw-r--r--crates/shirabe/src/command/show_command.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/shirabe/src/command/show_command.rs b/crates/shirabe/src/command/show_command.rs
index 19e7712..781ee20 100644
--- a/crates/shirabe/src/command/show_command.rs
+++ b/crates/shirabe/src/command/show_command.rs
@@ -284,7 +284,8 @@ impl ShowCommand {
let locker_rc = composer_ref.get_locker().clone();
let mut locker = locker_rc.borrow_mut();
if locker.is_locked() {
- let lr_handle = RepositoryInterfaceHandle::new(locker.get_locked_repository(true)?);
+ let lr_handle: RepositoryInterfaceHandle =
+ locker.get_locked_repository(true)?.into();
installed_repo = RepositoryInterfaceHandle::new(InstalledRepository::new(vec![
lr_handle.clone(),
local_repo,
@@ -348,7 +349,7 @@ impl ShowCommand {
let mut locker = locker_rc.borrow_mut();
let lr =
locker.get_locked_repository(input.get_option("no-dev").as_bool() != Some(true))?;
- let lr_handle = RepositoryInterfaceHandle::new(lr);
+ let lr_handle: RepositoryInterfaceHandle = lr.into();
if input.get_option("self").as_bool() == Some(true) {
// TODO(phase-b): LockArrayRepository needs add_package via WritableRepositoryInterface;
// skipping the insertion here keeps compile clean.