Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm-builder: bump toml from 0.8.2 to 0.8.8; replace ansi_term #2914

Merged
merged 7 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 77 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions substrate/utils/wasm-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ workspace = true
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
ansi_term = "0.12.1"
build-helper = "0.1.1"
cargo_metadata = "0.15.4"
console = "0.15.8"
strum = { version = "0.24.1", features = ["derive"] }
tempfile = "3.1.0"
toml = "0.8.2"
toml = "0.8.8"
walkdir = "2.3.2"
sp-maybe-compressed-blob = { path = "../../primitives/maybe-compressed-blob" }
filetime = "0.2.16"
Expand Down
11 changes: 5 additions & 6 deletions substrate/utils/wasm-builder/src/prerequisites.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion substrate/utils/wasm-builder/src/wasm_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()
}
Expand Down