diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-17 14:33:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-17 14:38:16 +0900 |
| commit | 3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3 (patch) | |
| tree | 712ae7832124da20739f5b389cebe4f44abd7225 /crates/shirabe/src/downloader/vcs_downloader.rs | |
| parent | ac59538140a93d9a023da2115148bc9779223978 (diff) | |
| download | php-shirabe-3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3.tar.gz php-shirabe-3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3.tar.zst php-shirabe-3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3.zip | |
fix(compile): extract constants from traits to make them dyn-compatible
Diffstat (limited to 'crates/shirabe/src/downloader/vcs_downloader.rs')
| -rw-r--r-- | crates/shirabe/src/downloader/vcs_downloader.rs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/crates/shirabe/src/downloader/vcs_downloader.rs b/crates/shirabe/src/downloader/vcs_downloader.rs index 9ec86ff..05593e5 100644 --- a/crates/shirabe/src/downloader/vcs_downloader.rs +++ b/crates/shirabe/src/downloader/vcs_downloader.rs @@ -1,5 +1,6 @@ //! ref: composer/src/Composer/Downloader/VcsDownloader.php +use crate::io::io_interface; use anyhow::Result; use indexmap::IndexMap; use shirabe_external_packages::react::promise::promise_interface::PromiseInterface; @@ -138,7 +139,7 @@ pub trait VcsDownloader: self.io_mut().write_error( PhpMixed::String(format!("Failed: [{}] {}", get_class(&e), e,)), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } else if count(&PhpMixed::List( urls.iter() @@ -149,7 +150,7 @@ pub trait VcsDownloader: self.io_mut().write_error( PhpMixed::String(" Failed, trying the next URL".to_string()), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } if count(&PhpMixed::List( @@ -232,7 +233,7 @@ pub trait VcsDownloader: InstallOperation::format(package, false) )), false, - IOInterface::NORMAL, + io_interface::NORMAL, ); let mut urls = self.prepare_urls(package.get_source_urls()); @@ -252,7 +253,7 @@ pub trait VcsDownloader: self.io_mut().write_error( PhpMixed::String(format!("Failed: [{}] {}", get_class(&e), e,)), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } else if count(&PhpMixed::List( urls.iter() @@ -263,7 +264,7 @@ pub trait VcsDownloader: self.io_mut().write_error( PhpMixed::String(" Failed, trying the next URL".to_string()), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } if count(&PhpMixed::List( @@ -304,7 +305,7 @@ pub trait VcsDownloader: UpdateOperation::format(initial, target, false), )), false, - IOInterface::NORMAL, + io_interface::NORMAL, ); let mut urls = self.prepare_urls(target.get_source_urls()); @@ -330,7 +331,7 @@ pub trait VcsDownloader: self.io_mut().write_error( PhpMixed::String(format!("Failed: [{}] {}", get_class(&e), e,)), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } else if count(&PhpMixed::List( urls.iter() @@ -341,7 +342,7 @@ pub trait VcsDownloader: self.io_mut().write_error( PhpMixed::String(" Failed, trying the next URL".to_string()), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } exception = Some(e); @@ -381,10 +382,10 @@ pub trait VcsDownloader: self.io_mut().write_error( PhpMixed::String(format!(" {}", message)), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); self.io_mut() - .write_error(PhpMixed::String(logs), true, IOInterface::NORMAL); + .write_error(PhpMixed::String(logs), true, io_interface::NORMAL); } } @@ -408,7 +409,7 @@ pub trait VcsDownloader: UninstallOperation::format(package, false) )), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); let promise = self.filesystem_mut().remove_directory_async(path); |
