aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/package/alias_package.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-26 00:38:27 +0900
committernsfisis <nsfisis@gmail.com>2026-06-26 00:38:27 +0900
commit90c7acbd8e6eb1ddaf8680de6a1ef9f2417d50ce (patch)
treedac10f7452ab58e36c2795e18c23edffe3045c50 /crates/shirabe/src/package/alias_package.rs
parente0ba36807619780ff645efe0117281d32d5ace2a (diff)
downloadphp-shirabe-90c7acbd8e6eb1ddaf8680de6a1ef9f2417d50ce.tar.gz
php-shirabe-90c7acbd8e6eb1ddaf8680de6a1ef9f2417d50ce.tar.zst
php-shirabe-90c7acbd8e6eb1ddaf8680de6a1ef9f2417d50ce.zip
feat(dependency-resolver): wire operation get_package and unblock solver tests
Override OperationInterface::get_package for Install/Uninstall/MarkAlias* operations so trait-object dispatch no longer hits the default todo!(), and implement Rule::is_caused_by_lock's locked-repository lookup via Request::get_locked_repository (LockArrayRepository::get_packages is infallible). Change PackageInterface::get_type to return String (matching PHP getType(): string) so AliasPackage can delegate live to its aliasOf handle across the RefCell instead of an impossible &str borrow. Un-ignores 25 SolverTest cases; 2 alias cases stay ignored pending a real solver alias-resolution discrepancy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/package/alias_package.rs')
-rw-r--r--crates/shirabe/src/package/alias_package.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/shirabe/src/package/alias_package.rs b/crates/shirabe/src/package/alias_package.rs
index c0e71ec..1cc899d 100644
--- a/crates/shirabe/src/package/alias_package.rs
+++ b/crates/shirabe/src/package/alias_package.rs
@@ -270,11 +270,8 @@ impl PackageInterface for AliasPackage {
self.dev_requires.clone()
}
- fn get_type(&self) -> &str {
- // Delegates to the shared `aliasOf` handle, whose getters yield owned
- // `String`s; a borrow cannot escape the `RefCell`. Use the handle API
- // (`AliasPackageHandle::get_alias_of().get_type()`) instead.
- todo!("AliasPackage::get_type cannot return &str across the aliasOf handle")
+ fn get_type(&self) -> String {
+ self.alias_of.get_type()
}
fn get_target_dir(&self) -> Option<String> {