aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-08 02:44:38 +0900
committernsfisis <nsfisis@gmail.com>2026-06-08 02:44:38 +0900
commit243450fee9853c2fea66ae0642dabb8db5227d6f (patch)
tree8a3ee16555d04835ef7afad576942b642bfdcfa6 /crates/shirabe/src/command
parent06368584a9277022d9cfc42d22c37f4cc6e580f8 (diff)
downloadphp-shirabe-243450fee9853c2fea66ae0642dabb8db5227d6f.tar.gz
php-shirabe-243450fee9853c2fea66ae0642dabb8db5227d6f.tar.zst
php-shirabe-243450fee9853c2fea66ae0642dabb8db5227d6f.zip
feat(phase-c): resolve closure-capture phase-b TODOs in config/create-project
Port Config::process() to the real Preg::replace_callback, whose closure borrows &self/flags and calls get_with_flags; surface get() errors via a captured cell so process now returns Result. Switch the replace_callback shim bounds to FnMut to allow the error-capturing closure. Wire CreateProjectCommand suggestion collection through the Rc<RefCell> reporter's interior mutation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command')
-rw-r--r--crates/shirabe/src/command/create_project_command.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/shirabe/src/command/create_project_command.rs b/crates/shirabe/src/command/create_project_command.rs
index 77cbea7..f8fc511 100644
--- a/crates/shirabe/src/command/create_project_command.rs
+++ b/crates/shirabe/src/command/create_project_command.rs
@@ -972,8 +972,11 @@ impl CreateProjectCommand {
im.notify_installs(io.clone());
// collect suggestions
- // TODO(phase-b): self.suggested_packages_reporter is on the outer scope via &self
- // self.suggested_packages_reporter.add_suggestions_from_package(&*package);
+ self.suggested_packages_reporter
+ .as_ref()
+ .unwrap()
+ .borrow_mut()
+ .add_suggestions_from_package(package.clone());
let installed_from_vcs = package.get_installation_source().as_deref() == Some("source");