From 3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 17 May 2026 14:33:13 +0900 Subject: fix(compile): extract constants from traits to make them dyn-compatible --- crates/shirabe/src/command/init_command.rs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'crates/shirabe/src/command/init_command.rs') diff --git a/crates/shirabe/src/command/init_command.rs b/crates/shirabe/src/command/init_command.rs index d8f0113..b43fdea 100644 --- a/crates/shirabe/src/command/init_command.rs +++ b/crates/shirabe/src/command/init_command.rs @@ -1,5 +1,6 @@ //! ref: composer/src/Composer/Command/InitCommand.php +use crate::io::io_interface; use anyhow::Result; use indexmap::IndexMap; use shirabe_external_packages::composer::pcre::preg::Preg; @@ -271,7 +272,7 @@ impl InitCommand { Box::new(PhpMixed::String(String::new())), ]), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); if !io.ask_confirmation( "Do you confirm generation [yes]? ".to_string(), @@ -280,7 +281,7 @@ impl InitCommand { io.write_error( PhpMixed::String("Command aborted".to_string()), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); return Ok(1); @@ -289,7 +290,7 @@ impl InitCommand { io.write_error( PhpMixed::String(format!("Writing {}", file_obj.get_path())), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } @@ -303,7 +304,7 @@ impl InitCommand { "Schema validation error, aborting".to_string(), ), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); let errors = format!( " - {}", @@ -312,7 +313,7 @@ impl InitCommand { io.write_error( PhpMixed::String(format!("{}:{}{}", json_err.message, PHP_EOL, errors)), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); Silencer::call( "unlink", @@ -376,7 +377,7 @@ impl InitCommand { autoload_path.as_deref().unwrap_or("") )), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); io.write_error( PhpMixed::String( @@ -384,7 +385,7 @@ impl InitCommand { .to_string(), ), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } @@ -493,7 +494,7 @@ impl InitCommand { Box::new(PhpMixed::String(String::new())), ]), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); // namespace @@ -507,7 +508,7 @@ impl InitCommand { Box::new(PhpMixed::String(String::new())), ]), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); let mut name = input @@ -709,7 +710,7 @@ impl InitCommand { Box::new(PhpMixed::String(String::new())), ]), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); // prepare to resolve dependencies @@ -1024,7 +1025,7 @@ impl InitCommand { .to_string(), ), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } } @@ -1040,7 +1041,7 @@ impl InitCommand { self.inner.get_io().write_error( PhpMixed::String("Could not run dump-autoload.".to_string()), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } } -- cgit v1.3.1