mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 07:37:57 +00:00
wasm-builder: bump toml from 0.8.2 to 0.8.8; replace ansi_term (#2914)
Hi folks! Thank for the well organized codebase and an outstanding engineering! I am trying to compile a substrate node template from source (https://github.com/paritytech/polkadot-sdk) and encountered a dependency conflict  and a deprecation warning from advisory db for `ansi_term` (I see you replace it with some alternatives in other crates). While for `ansi_term` there is an adopted fork (https://github.com/rustadopt/ansiterm-rs) and it was my first commit in the PR, I've decided to use https://github.com/console-rs/console as you already use it to reduce dependencies (as I believe other substrate crates will remove ansi_term eventually) --------- Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -17,15 +17,14 @@
|
||||
|
||||
use crate::{write_file_if_changed, CargoCommand, CargoCommandVersioned};
|
||||
|
||||
use console::style;
|
||||
use std::{fs, path::Path};
|
||||
|
||||
use ansi_term::Color;
|
||||
use tempfile::tempdir;
|
||||
|
||||
/// Print an error message.
|
||||
fn print_error_message(message: &str) -> String {
|
||||
if super::color_output_enabled() {
|
||||
Color::Red.bold().paint(message).to_string()
|
||||
style(message).red().bold().to_string()
|
||||
} else {
|
||||
message.into()
|
||||
}
|
||||
@@ -117,10 +116,10 @@ fn check_wasm_toolchain_installed(
|
||||
Ok(ref err) => Err(format!(
|
||||
"{}\n\n{}\n{}\n{}{}\n",
|
||||
err_msg,
|
||||
Color::Yellow.bold().paint("Further error information:"),
|
||||
Color::Yellow.bold().paint("-".repeat(60)),
|
||||
style("Further error information:").yellow().bold(),
|
||||
style("-".repeat(60)).yellow().bold(),
|
||||
err,
|
||||
Color::Yellow.bold().paint("-".repeat(60)),
|
||||
style("-".repeat(60)).yellow().bold(),
|
||||
)),
|
||||
|
||||
Err(_) => Err(err_msg),
|
||||
|
||||
@@ -19,6 +19,7 @@ use crate::{write_file_if_changed, CargoCommandVersioned, OFFLINE};
|
||||
|
||||
use build_helper::rerun_if_changed;
|
||||
use cargo_metadata::{DependencyKind, Metadata, MetadataCommand};
|
||||
use console::style;
|
||||
use parity_wasm::elements::{deserialize_buffer, Module};
|
||||
use std::{
|
||||
borrow::ToOwned,
|
||||
@@ -38,7 +39,7 @@ use walkdir::WalkDir;
|
||||
/// Returns the colorized message.
|
||||
fn colorize_info_message(message: &str) -> String {
|
||||
if super::color_output_enabled() {
|
||||
ansi_term::Color::Yellow.bold().paint(message).to_string()
|
||||
style(message).yellow().bold().to_string()
|
||||
} else {
|
||||
message.into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user