aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/require_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-28 22:43:11 +0900
committernsfisis <nsfisis@gmail.com>2026-05-28 22:43:43 +0900
commiteea4efe87e455742ec17881ee93d8095925e8516 (patch)
tree6d242f4fdd0bf32f0494a6fbbd62bce9ed6e1dc7 /crates/shirabe/src/command/require_command.rs
parentcc5d73c05a0abca2eebcc8a6afa0b1543ee49850 (diff)
downloadphp-shirabe-eea4efe87e455742ec17881ee93d8095925e8516.tar.gz
php-shirabe-eea4efe87e455742ec17881ee93d8095925e8516.tar.zst
php-shirabe-eea4efe87e455742ec17881ee93d8095925e8516.zip
refactor(repository): introduce Rc<RefCell<_>> handles for repositories
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/require_command.rs')
-rw-r--r--crates/shirabe/src/command/require_command.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/shirabe/src/command/require_command.rs b/crates/shirabe/src/command/require_command.rs
index bf5f159..93ec469 100644
--- a/crates/shirabe/src/command/require_command.rs
+++ b/crates/shirabe/src/command/require_command.rs
@@ -261,10 +261,12 @@ impl RequireCommand {
.unwrap_or_default();
// initialize self.repos as it is used by the PackageDiscoveryTrait
let platform_repo = PlatformRepository::new(vec![], platform_overrides_map)?;
- let mut combined: Vec<Box<dyn crate::repository::RepositoryInterface>> = vec![
- // TODO(phase-b): PlatformRepository should be shared via Rc; use placeholder until
- // CompositeRepository accepts shared references
- Box::new(todo!("share platform_repo with PlatformRepository") as PlatformRepository),
+ let mut combined: Vec<crate::repository::RepositoryInterfaceHandle> = vec![
+ // TODO(phase-c): share this platform_repo as a handle instead of constructing a
+ // separate one; PlatformRepository is held by value here for the requirement below.
+ crate::repository::RepositoryInterfaceHandle::new::<PlatformRepository>(todo!(
+ "share platform_repo with PlatformRepository"
+ )),
];
for _repo in repos {
// TODO(phase-b): repos are borrowed from RepositoryManager; need to take ownership