Adds an error recap
Build Successful The build was successful
Ravenous/ravenous-tools/pipeline/head This commit looks good
Details
Build Successful The build was successful
Ravenous/ravenous-tools/pipeline/head This commit looks good
Details
This commit is contained in:
parent
59a78f4236
commit
c74de46f8b
|
|
@ -6,7 +6,7 @@ resolver = "3"
|
|||
# edition = "2024"
|
||||
# license = "MIT OR Apache-2.0"
|
||||
[workspace.package]
|
||||
version = "0.3.9"
|
||||
version = "0.3.10"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
|
|||
|
|
@ -268,6 +268,10 @@ fn checkline(
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
if final_line.vlvl() >= VerboseLevel::Error {
|
||||
let v = final_line.clone();
|
||||
let _ = status.first_error.set(v);
|
||||
}
|
||||
match &final_line.vlvl() {
|
||||
VerboseLevel::None => (),
|
||||
VerboseLevel::Misc => pb.println(format!(
|
||||
|
|
@ -327,7 +331,7 @@ fn checkline(
|
|||
))
|
||||
}
|
||||
VerboseLevel::Uncatchable => {
|
||||
// status.errors += 1;
|
||||
status.errors += 1;
|
||||
pb.println(format!(
|
||||
"{} {}",
|
||||
*TXT_UKNW,
|
||||
|
|
@ -335,5 +339,6 @@ fn checkline(
|
|||
))
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use config::make::VerboseLevel;
|
|||
use logos::Logos;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{
|
||||
cell::OnceCell,
|
||||
io::{Read, Write},
|
||||
sync::LazyLock,
|
||||
time::{Duration, Instant},
|
||||
|
|
@ -141,7 +142,7 @@ impl BuildInfo {
|
|||
|
||||
/// The line encountered
|
||||
// #[allow(unused)]
|
||||
#[derive(Debug, Logos, PartialEq)]
|
||||
#[derive(Debug, Logos, PartialEq, Clone)]
|
||||
#[logos(skip r"[) ]+")]
|
||||
pub(super) enum LineType {
|
||||
/// The tex building mode : entering extended mode
|
||||
|
|
@ -407,8 +408,8 @@ pub(super) struct Status {
|
|||
pub(super) warnings: usize,
|
||||
/// Only makes sense with non-interactie builds
|
||||
pub(super) errors: usize,
|
||||
// /// List of all recoverable
|
||||
// pub(super) v_errors: Vec<String>,
|
||||
/// List of all recoverable
|
||||
pub(super) first_error: OnceCell<LineType>,
|
||||
}
|
||||
|
||||
impl Status {
|
||||
|
|
@ -418,6 +419,7 @@ impl Status {
|
|||
info: 0,
|
||||
warnings: 0,
|
||||
errors: 0,
|
||||
first_error: OnceCell::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -429,6 +431,16 @@ impl Status {
|
|||
file_info: BuilderParseResult,
|
||||
) {
|
||||
let col_bld = COL_INFO.clone().bold();
|
||||
if self.errors > 3 {
|
||||
println!(
|
||||
"{} {}",
|
||||
col_bld.apply_to("[RCAP]"),
|
||||
COL_NORMAL.apply_to(format!(
|
||||
"The first error encountered was: {:?}",
|
||||
self.first_error.get()
|
||||
))
|
||||
);
|
||||
}
|
||||
println!();
|
||||
println!(
|
||||
"{} {}",
|
||||
|
|
|
|||
Loading…
Reference in New Issue