diff --git a/Cargo.lock b/Cargo.lock index fc7f5be4d..59ff788ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -746,10 +746,11 @@ checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "codespan-reporting" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ + "serde", "termcolor", "unicode-width", ] @@ -2419,7 +2420,6 @@ dependencies = [ "serde", "spirv 0.3.0+sdk-1.3.268.0", "strum 0.26.3", - "termcolor", "thiserror 2.0.12", "toml", "unicode-ident", diff --git a/Cargo.toml b/Cargo.toml index 17c25cef5..31e3bdfd1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -98,7 +98,7 @@ cargo_metadata = "0.19" cfg_aliases = "0.2.1" cfg-if = "1" criterion = "0.5" -codespan-reporting = "0.11" +codespan-reporting = { version = "0.12", default-features = false } ctor = "0.2" document-features = "0.2.11" encase = "0.10.0" diff --git a/naga-cli/Cargo.toml b/naga-cli/Cargo.toml index 2d00c4a06..21255b367 100644 --- a/naga-cli/Cargo.toml +++ b/naga-cli/Cargo.toml @@ -40,7 +40,10 @@ naga = { workspace = true, features = [ ] } bincode.workspace = true -codespan-reporting.workspace = true +codespan-reporting = { workspace = true, default-features = false, features = [ + "std", + "termcolor", +] } env_logger.workspace = true argh.workspace = true anyhow = { workspace = true, features = ["std"] } diff --git a/naga/Cargo.toml b/naga/Cargo.toml index 445ad73c1..5079fd7d9 100644 --- a/naga/Cargo.toml +++ b/naga/Cargo.toml @@ -85,11 +85,10 @@ arbitrary = { version = "1.4", features = ["derive"], optional = true } arrayvec.workspace = true bitflags.workspace = true bit-set.workspace = true -termcolor = { version = "1.4.1" } -# remove termcolor dep when updating to the next version of codespan-reporting -# termcolor minimum version was wrong and was fixed in -# https://github.com/brendanzab/codespan/commit/e99c867339a877731437e7ee6a903a3d03b5439e -codespan-reporting = { version = "0.11.0" } +codespan-reporting = { workspace = true, default-features = false, features = [ + "std", + "termcolor", +] } hashbrown.workspace = true half = { workspace = true, features = ["arbitrary", "num-traits"] } rustc-hash.workspace = true diff --git a/naga/src/error.rs b/naga/src/error.rs index dbc99651f..81aa99d9d 100644 --- a/naga/src/error.rs +++ b/naga/src/error.rs @@ -40,7 +40,7 @@ impl fmt::Display for ShaderError<crate::WithSpan<crate::valid::ValidationError> let label = self.label.as_deref().unwrap_or_default(); let files = SimpleFile::new(label, &self.source); let config = term::Config::default(); - let mut writer = termcolor::NoColor::new(Vec::new()); + let mut writer = term::termcolor::NoColor::new(Vec::new()); term::emit(&mut writer, &config, &files, &self.inner.diagnostic()) .expect("cannot write error"); write!( diff --git a/naga/src/front/glsl/error.rs b/naga/src/front/glsl/error.rs index 966c97e51..13c679019 100644 --- a/naga/src/front/glsl/error.rs +++ b/naga/src/front/glsl/error.rs @@ -8,8 +8,8 @@ use alloc::{ use codespan_reporting::diagnostic::{Diagnostic, Label}; use codespan_reporting::files::SimpleFile; use codespan_reporting::term; +use codespan_reporting::term::termcolor::{NoColor, WriteColor}; use pp_rs::token::PreprocessorError; -use termcolor::{NoColor, WriteColor}; use thiserror::Error; use super::token::TokenValue; diff --git a/naga/src/front/spv/error.rs b/naga/src/front/spv/error.rs index 42b1bca08..016c690c4 100644 --- a/naga/src/front/spv/error.rs +++ b/naga/src/front/spv/error.rs @@ -7,7 +7,7 @@ use alloc::{ use codespan_reporting::diagnostic::Diagnostic; use codespan_reporting::files::SimpleFile; use codespan_reporting::term; -use termcolor::{NoColor, WriteColor}; +use codespan_reporting::term::termcolor::{NoColor, WriteColor}; use super::ModuleState; use crate::{arena::Handle, front::atomic_upgrade}; diff --git a/naga/src/front/wgsl/error.rs b/naga/src/front/wgsl/error.rs index 346cd8e6c..7ea17df78 100644 --- a/naga/src/front/wgsl/error.rs +++ b/naga/src/front/wgsl/error.rs @@ -14,7 +14,7 @@ use super::parse::lexer::Token; use codespan_reporting::diagnostic::{Diagnostic, Label}; use codespan_reporting::files::SimpleFile; use codespan_reporting::term; -use termcolor::{ColorChoice, NoColor, StandardStream}; +use codespan_reporting::term::termcolor::{ColorChoice, NoColor, StandardStream}; use thiserror::Error; use alloc::{ diff --git a/naga/src/span.rs b/naga/src/span.rs index fbc2de633..d0089e58a 100644 --- a/naga/src/span.rs +++ b/naga/src/span.rs @@ -285,8 +285,8 @@ impl<E> WithSpan<E> { where E: Error, { + use codespan_reporting::term::termcolor::{ColorChoice, StandardStream}; use codespan_reporting::{files, term}; - use term::termcolor::{ColorChoice, StandardStream}; let files = files::SimpleFile::new(path, source); let config = term::Config::default(); @@ -308,8 +308,8 @@ impl<E> WithSpan<E> { where E: Error, { + use codespan_reporting::term::termcolor::NoColor; use codespan_reporting::{files, term}; - use term::termcolor::NoColor; let files = files::SimpleFile::new(path, source); let config = term::Config::default();