mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-21 12:07:31 +00:00
Switch time
to jiff
for time formatting in ICE dumps
This commit is contained in:
parent
b6d74b5e15
commit
41fcdab3b5
54
Cargo.lock
54
Cargo.lock
@ -890,15 +890,6 @@ dependencies = [
|
|||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "deranged"
|
|
||||||
version = "0.4.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
|
|
||||||
dependencies = [
|
|
||||||
"powerfmt",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "derive-where"
|
name = "derive-where"
|
||||||
version = "1.2.7"
|
version = "1.2.7"
|
||||||
@ -2385,12 +2376,6 @@ dependencies = [
|
|||||||
"num-traits",
|
"num-traits",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "num-conv"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-integer"
|
name = "num-integer"
|
||||||
version = "0.1.46"
|
version = "0.1.46"
|
||||||
@ -2768,12 +2753,6 @@ dependencies = [
|
|||||||
"portable-atomic",
|
"portable-atomic",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "powerfmt"
|
|
||||||
version = "0.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ppv-lite86"
|
name = "ppv-lite86"
|
||||||
version = "0.2.21"
|
version = "0.2.21"
|
||||||
@ -3572,6 +3551,7 @@ name = "rustc_driver_impl"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ctrlc",
|
"ctrlc",
|
||||||
|
"jiff",
|
||||||
"libc",
|
"libc",
|
||||||
"rustc_abi",
|
"rustc_abi",
|
||||||
"rustc_ast",
|
"rustc_ast",
|
||||||
@ -3618,7 +3598,6 @@ dependencies = [
|
|||||||
"rustc_ty_utils",
|
"rustc_ty_utils",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"shlex",
|
"shlex",
|
||||||
"time",
|
|
||||||
"tracing",
|
"tracing",
|
||||||
"windows 0.59.0",
|
"windows 0.59.0",
|
||||||
]
|
]
|
||||||
@ -5311,37 +5290,6 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "time"
|
|
||||||
version = "0.3.41"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
|
|
||||||
dependencies = [
|
|
||||||
"deranged",
|
|
||||||
"itoa",
|
|
||||||
"num-conv",
|
|
||||||
"powerfmt",
|
|
||||||
"serde",
|
|
||||||
"time-core",
|
|
||||||
"time-macros",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "time-core"
|
|
||||||
version = "0.1.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "time-macros"
|
|
||||||
version = "0.2.22"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49"
|
|
||||||
dependencies = [
|
|
||||||
"num-conv",
|
|
||||||
"time-core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tinystr"
|
name = "tinystr"
|
||||||
version = "0.7.6"
|
version = "0.7.6"
|
||||||
|
@ -4,6 +4,7 @@ version = "0.0.0"
|
|||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
jiff = { version = "0.2.5", default-features = false, features = ["std"] }
|
||||||
# tidy-alphabetical-start
|
# tidy-alphabetical-start
|
||||||
rustc_abi = { path = "../rustc_abi" }
|
rustc_abi = { path = "../rustc_abi" }
|
||||||
rustc_ast = { path = "../rustc_ast" }
|
rustc_ast = { path = "../rustc_ast" }
|
||||||
@ -50,7 +51,6 @@ rustc_trait_selection = { path = "../rustc_trait_selection" }
|
|||||||
rustc_ty_utils = { path = "../rustc_ty_utils" }
|
rustc_ty_utils = { path = "../rustc_ty_utils" }
|
||||||
serde_json = "1.0.59"
|
serde_json = "1.0.59"
|
||||||
shlex = "1.0"
|
shlex = "1.0"
|
||||||
time = { version = "0.3.36", default-features = false, features = ["alloc", "formatting", "macros"] }
|
|
||||||
tracing = { version = "0.1.35" }
|
tracing = { version = "0.1.35" }
|
||||||
# tidy-alphabetical-end
|
# tidy-alphabetical-end
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ use std::path::{Path, PathBuf};
|
|||||||
use std::process::{self, Command, Stdio};
|
use std::process::{self, Command, Stdio};
|
||||||
use std::sync::OnceLock;
|
use std::sync::OnceLock;
|
||||||
use std::sync::atomic::{AtomicBool, Ordering};
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
use std::time::{Instant, SystemTime};
|
use std::time::Instant;
|
||||||
use std::{env, str};
|
use std::{env, str};
|
||||||
|
|
||||||
use rustc_ast as ast;
|
use rustc_ast as ast;
|
||||||
@ -66,8 +66,6 @@ use rustc_session::{EarlyDiagCtxt, Session, config, filesearch};
|
|||||||
use rustc_span::FileName;
|
use rustc_span::FileName;
|
||||||
use rustc_target::json::ToJson;
|
use rustc_target::json::ToJson;
|
||||||
use rustc_target::spec::{Target, TargetTuple};
|
use rustc_target::spec::{Target, TargetTuple};
|
||||||
use time::OffsetDateTime;
|
|
||||||
use time::macros::format_description;
|
|
||||||
use tracing::trace;
|
use tracing::trace;
|
||||||
|
|
||||||
#[allow(unused_macros)]
|
#[allow(unused_macros)]
|
||||||
@ -1304,13 +1302,8 @@ fn ice_path_with_config(config: Option<&UnstableOptions>) -> &'static Option<Pat
|
|||||||
.or_else(|| std::env::current_dir().ok())
|
.or_else(|| std::env::current_dir().ok())
|
||||||
.unwrap_or_default(),
|
.unwrap_or_default(),
|
||||||
};
|
};
|
||||||
let now: OffsetDateTime = SystemTime::now().into();
|
// Don't use a standard datetime format because Windows doesn't support `:` in paths
|
||||||
let file_now = now
|
let file_now = jiff::Zoned::now().strftime("%Y-%m-%dT%H_%M_%S");
|
||||||
.format(
|
|
||||||
// Don't use a standard datetime format because Windows doesn't support `:` in paths
|
|
||||||
&format_description!("[year]-[month]-[day]T[hour]_[minute]_[second]"),
|
|
||||||
)
|
|
||||||
.unwrap_or_default();
|
|
||||||
let pid = std::process::id();
|
let pid = std::process::id();
|
||||||
path.push(format!("rustc-ice-{file_now}-{pid}.txt"));
|
path.push(format!("rustc-ice-{file_now}-{pid}.txt"));
|
||||||
Some(path)
|
Some(path)
|
||||||
|
@ -31,7 +31,6 @@ pub static CRATES: &[&str] = &[
|
|||||||
"mime_guess",
|
"mime_guess",
|
||||||
"minimal-lexical",
|
"minimal-lexical",
|
||||||
"nom",
|
"nom",
|
||||||
"num-conv",
|
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"pest",
|
"pest",
|
||||||
"pest_generator",
|
"pest_generator",
|
||||||
@ -49,7 +48,6 @@ pub static CRATES: &[&str] = &[
|
|||||||
"syn",
|
"syn",
|
||||||
"synstructure",
|
"synstructure",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"time-core",
|
|
||||||
"tinystr",
|
"tinystr",
|
||||||
"type-map",
|
"type-map",
|
||||||
"typenum",
|
"typenum",
|
||||||
|
@ -270,7 +270,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
|
|||||||
"darling_core",
|
"darling_core",
|
||||||
"darling_macro",
|
"darling_macro",
|
||||||
"datafrog",
|
"datafrog",
|
||||||
"deranged",
|
|
||||||
"derive-where",
|
"derive-where",
|
||||||
"derive_setters",
|
"derive_setters",
|
||||||
"digest",
|
"digest",
|
||||||
@ -311,6 +310,8 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
|
|||||||
"intl_pluralrules",
|
"intl_pluralrules",
|
||||||
"itertools",
|
"itertools",
|
||||||
"itoa",
|
"itoa",
|
||||||
|
"jiff",
|
||||||
|
"jiff-static",
|
||||||
"jobserver",
|
"jobserver",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"leb128",
|
"leb128",
|
||||||
@ -328,7 +329,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
|
|||||||
"miniz_oxide",
|
"miniz_oxide",
|
||||||
"nix",
|
"nix",
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
"num-conv",
|
|
||||||
"num_cpus",
|
"num_cpus",
|
||||||
"object",
|
"object",
|
||||||
"odht",
|
"odht",
|
||||||
@ -341,7 +341,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
|
|||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"polonius-engine",
|
"polonius-engine",
|
||||||
"portable-atomic", // dependency for platforms doesn't support `AtomicU64` in std
|
"portable-atomic", // dependency for platforms doesn't support `AtomicU64` in std
|
||||||
"powerfmt",
|
"portable-atomic-util",
|
||||||
"ppv-lite86",
|
"ppv-lite86",
|
||||||
"proc-macro-hack",
|
"proc-macro-hack",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@ -394,9 +394,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
|
|||||||
"thorin-dwp",
|
"thorin-dwp",
|
||||||
"thread_local",
|
"thread_local",
|
||||||
"tikv-jemalloc-sys",
|
"tikv-jemalloc-sys",
|
||||||
"time",
|
|
||||||
"time-core",
|
|
||||||
"time-macros",
|
|
||||||
"tinystr",
|
"tinystr",
|
||||||
"tinyvec",
|
"tinyvec",
|
||||||
"tinyvec_macros",
|
"tinyvec_macros",
|
||||||
|
Loading…
Reference in New Issue
Block a user