Skip to content

Update codespan-reporting to 0.12 #7398

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

Merged
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
6 changes: 3 additions & 3 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion naga-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
9 changes: 4 additions & 5 deletions naga/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion naga/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down
2 changes: 1 addition & 1 deletion naga/src/front/glsl/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion naga/src/front/spv/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion naga/src/front/wgsl/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
4 changes: 2 additions & 2 deletions naga/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
Loading