aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-06 20:23:29 +0900
committernsfisis <nsfisis@gmail.com>2026-06-06 20:23:29 +0900
commit2061874a76ed9c255027fd0673b478225fa468d5 (patch)
tree9b605969e0da284d91972a445c49fbc4afbbbab3 /crates/shirabe/src
parent66bcf2d099a14c718931be9c9426629bc5b94e6e (diff)
downloadphp-shirabe-2061874a76ed9c255027fd0673b478225fa468d5.tar.gz
php-shirabe-2061874a76ed9c255027fd0673b478225fa468d5.tar.zst
php-shirabe-2061874a76ed9c255027fd0673b478225fa468d5.zip
feat(validate-command): pass root package to missing requirement info
Resolve the phase-b TODO by passing composer.get_package() to Locker::get_missing_requirement_info. The package is an Rc-backed handle and the locker is borrowed from a separate Rc, so there is no borrow conflict. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src')
-rw-r--r--crates/shirabe/src/command/validate_command.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/shirabe/src/command/validate_command.rs b/crates/shirabe/src/command/validate_command.rs
index eaae2db..e9fd424 100644
--- a/crates/shirabe/src/command/validate_command.rs
+++ b/crates/shirabe/src/command/validate_command.rs
@@ -186,9 +186,6 @@ impl ValidateCommand {
.get_option("check-lock")
.as_bool()
.unwrap_or(false);
- // TODO(phase-b): get_missing_requirement_info needs &package from composer while
- // locker holds &mut composer; cloning lock state isn't trivial. Use todo!() for the
- // package-arg subexpression below.
let locker = composer.get_locker().clone();
let mut locker = locker.borrow_mut();
if locker.is_locked() && !locker.is_fresh()? {
@@ -196,8 +193,8 @@ impl ValidateCommand {
}
if locker.is_locked() {
- // TODO(phase-b): borrows composer twice; use todo!() for the package arg.
- lock_errors.extend(locker.get_missing_requirement_info(todo!(), true)?);
+ lock_errors
+ .extend(locker.get_missing_requirement_info(composer.get_package().clone(), true)?);
}
self.output_result(