diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-06 20:23:29 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-06 20:23:29 +0900 |
| commit | 2061874a76ed9c255027fd0673b478225fa468d5 (patch) | |
| tree | 9b605969e0da284d91972a445c49fbc4afbbbab3 /crates | |
| parent | 66bcf2d099a14c718931be9c9426629bc5b94e6e (diff) | |
| download | php-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')
| -rw-r--r-- | crates/shirabe/src/command/validate_command.rs | 7 |
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( |
