From 6ae7e0d4b3eaf20e2d2cd3d000cf61ab0c9b6e83 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 11 Jun 2026 02:39:35 +0900 Subject: feat(console): resolve phase-b TODOs in doRun and IO wiring Wire up ConsoleIO with HelperSet/QuestionHelper, register the ErrorHandler with the IO instance, and fall back to a default output in run(). Replace resolved phase-b TODOs across the console, command, io, factory, installer, dependency_resolver, and util modules; reclassify the remaining blockers (typed Symfony command registry, stdin resource caching) as phase-c. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../shirabe/src/package/version/version_guesser.rs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/package') diff --git a/crates/shirabe/src/package/version/version_guesser.rs b/crates/shirabe/src/package/version/version_guesser.rs index 3b61eac..da67d56 100644 --- a/crates/shirabe/src/package/version/version_guesser.rs +++ b/crates/shirabe/src/package/version/version_guesser.rs @@ -411,12 +411,24 @@ impl VersionGuesser { } // re-use the HgDriver to fetch branches (this properly includes bookmarks) - let _io = NullIO::new(); let mut repo_config: IndexMap = IndexMap::new(); repo_config.insert("url".to_string(), PhpMixed::String(path.to_string())); - // TODO(phase-b): HgDriver lacks a `new` constructor and HttpDownloader::new signature is unknown - let mut driver: HgDriver = todo!( - "HgDriver::new(repo_config, Box::new(io), self.config.clone(), HttpDownloader::new(io, config), Rc::clone(&self.process))" + let io: std::rc::Rc> = + std::rc::Rc::new(std::cell::RefCell::new(NullIO::new())); + let http_io: std::rc::Rc> = + std::rc::Rc::new(std::cell::RefCell::new(NullIO::new())); + let http_downloader = std::rc::Rc::new(std::cell::RefCell::new(HttpDownloader::new( + http_io, + self.config.clone(), + IndexMap::new(), + false, + ))); + let mut driver = HgDriver::new( + repo_config, + io, + self.config.clone(), + http_downloader, + std::rc::Rc::clone(&self.process), ); let branches: Vec = array_map(|k: &String| k.clone(), &array_keys(&driver.get_branches()?)); -- cgit v1.3.1