From 5e31fa33c3b5cf726a57a063b8e7a070869250fe Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 19 May 2026 21:46:01 +0900 Subject: fix(compile): fix more random compile errors Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/shirabe/src/repository/vcs_repository.rs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'crates/shirabe/src/repository/vcs_repository.rs') diff --git a/crates/shirabe/src/repository/vcs_repository.rs b/crates/shirabe/src/repository/vcs_repository.rs index e53392f..1a511fd 100644 --- a/crates/shirabe/src/repository/vcs_repository.rs +++ b/crates/shirabe/src/repository/vcs_repository.rs @@ -45,7 +45,7 @@ pub struct VcsRepository { /// @var IOInterface pub(crate) io: Box, /// @var Config - pub(crate) config: Config, + pub(crate) config: std::rc::Rc>, /// @var VersionParser pub(crate) version_parser: Option, /// @var string @@ -55,9 +55,9 @@ pub struct VcsRepository { /// @var array pub(crate) repo_config: IndexMap, /// @var HttpDownloader - pub(crate) http_downloader: HttpDownloader, + pub(crate) http_downloader: std::rc::Rc>, /// @var ProcessExecutor - pub(crate) process_executor: ProcessExecutor, + pub(crate) process_executor: std::rc::Rc>, /// @var bool pub(crate) branch_error_occurred: bool, /// @var array> @@ -86,10 +86,10 @@ impl VcsRepository { pub fn new( mut repo_config: IndexMap, io: Box, - config: Config, - http_downloader: HttpDownloader, + config: std::rc::Rc>, + http_downloader: std::rc::Rc>, dispatcher: Option, - process: Option, + process: Option>>, drivers: Option>, version_cache: Option>, ) -> Result { @@ -154,8 +154,11 @@ impl VcsRepository { .to_string(); let is_verbose = io.is_verbose(); let is_very_verbose = io.is_very_verbose(); - let process_executor = - process.unwrap_or_else(|| ProcessExecutor::new(Some(Box::new(&*io)), None)); + let process_executor = process.unwrap_or_else(|| { + std::rc::Rc::new(std::cell::RefCell::new(ProcessExecutor::new(Some( + Box::new(&*io), + )))) + }); Ok(Self { inner, @@ -477,7 +480,7 @@ impl VcsRepository { // broken package, version doesn't match tag if version_normalized != parsed_tag { if is_very_verbose { - if Preg::is_match(r"{(^dev-|[.-]?dev$)}i", &parsed_tag) { + if Preg::is_match(r"{(^dev-|[.-]?dev$)}i", &parsed_tag).unwrap_or(false) { self.io.write_error(&format!( "Skipped tag {}, invalid tag name, tags can not use dev prefixes or suffixes", tag @@ -706,7 +709,7 @@ impl VcsRepository { } // TODO(phase-b): Box -> Box coercion self.inner.add_package( - crate::package::package_interface::PackageInterface::clone_box(&*package), + ::clone_box(&*package), )?; Ok(()) })(); -- cgit v1.3.1