Skip to content

Commit 0c38dbe

Browse files
committed
Switch time to jiff for time formatting in ICE dumps
1 parent b6d74b5 commit 0c38dbe

File tree

6 files changed

+8
-92
lines changed

6 files changed

+8
-92
lines changed

Cargo.lock

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -890,15 +890,6 @@ dependencies = [
890890
"winapi",
891891
]
892892

893-
[[package]]
894-
name = "deranged"
895-
version = "0.4.0"
896-
source = "registry+https://github.com/rust-lang/crates.io-index"
897-
checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
898-
dependencies = [
899-
"powerfmt",
900-
]
901-
902893
[[package]]
903894
name = "derive-where"
904895
version = "1.2.7"
@@ -2385,12 +2376,6 @@ dependencies = [
23852376
"num-traits",
23862377
]
23872378

2388-
[[package]]
2389-
name = "num-conv"
2390-
version = "0.1.0"
2391-
source = "registry+https://github.com/rust-lang/crates.io-index"
2392-
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
2393-
23942379
[[package]]
23952380
name = "num-integer"
23962381
version = "0.1.46"
@@ -2768,12 +2753,6 @@ dependencies = [
27682753
"portable-atomic",
27692754
]
27702755

2771-
[[package]]
2772-
name = "powerfmt"
2773-
version = "0.2.0"
2774-
source = "registry+https://github.com/rust-lang/crates.io-index"
2775-
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
2776-
27772756
[[package]]
27782757
name = "ppv-lite86"
27792758
version = "0.2.21"
@@ -3572,6 +3551,7 @@ name = "rustc_driver_impl"
35723551
version = "0.0.0"
35733552
dependencies = [
35743553
"ctrlc",
3554+
"jiff",
35753555
"libc",
35763556
"rustc_abi",
35773557
"rustc_ast",
@@ -3618,7 +3598,6 @@ dependencies = [
36183598
"rustc_ty_utils",
36193599
"serde_json",
36203600
"shlex",
3621-
"time",
36223601
"tracing",
36233602
"windows 0.59.0",
36243603
]
@@ -5311,37 +5290,6 @@ dependencies = [
53115290
"libc",
53125291
]
53135292

5314-
[[package]]
5315-
name = "time"
5316-
version = "0.3.41"
5317-
source = "registry+https://github.com/rust-lang/crates.io-index"
5318-
checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
5319-
dependencies = [
5320-
"deranged",
5321-
"itoa",
5322-
"num-conv",
5323-
"powerfmt",
5324-
"serde",
5325-
"time-core",
5326-
"time-macros",
5327-
]
5328-
5329-
[[package]]
5330-
name = "time-core"
5331-
version = "0.1.4"
5332-
source = "registry+https://github.com/rust-lang/crates.io-index"
5333-
checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
5334-
5335-
[[package]]
5336-
name = "time-macros"
5337-
version = "0.2.22"
5338-
source = "registry+https://github.com/rust-lang/crates.io-index"
5339-
checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49"
5340-
dependencies = [
5341-
"num-conv",
5342-
"time-core",
5343-
]
5344-
53455293
[[package]]
53465294
name = "tinystr"
53475295
version = "0.7.6"

Cargo.toml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,6 @@ exclude = [
6666
# so we turn overflow checks off for now.
6767
# FIXME: This workaround should be removed once #90227 is fixed.
6868
overflow-checks = false
69-
70-
# These are very thin wrappers around executing lld with the right binary name.
71-
# Basically nothing within them can go wrong without having been explicitly logged anyway.
72-
# We ship these in every rustc tarball and even after compression they add up
73-
# to around 0.6MB of data every user needs to download (and 15MB on disk).
74-
[profile.release.package.lld-wrapper]
75-
debug = 0
76-
strip = true
77-
[profile.release.package.wasm-component-ld-wrapper]
78-
debug = 0
79-
strip = true
80-
81-
# Bigint libraries are slow without optimization, speed up testing
82-
[profile.dev.package.test-float-parse]
83-
opt-level = 3
84-
85-
# Speed up the binary as much as possible
86-
[profile.release.package.test-float-parse]
87-
opt-level = 3
88-
codegen-units = 1
8969
# FIXME: LTO cannot be enabled for binaries in a workspace
9070
# <https://github.com/rust-lang/cargo/issues/9330>
9171
# lto = true

compiler/rustc_driver_impl/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.0.0"
44
edition = "2024"
55

66
[dependencies]
7+
jiff = { version = "0.2.5", default-features = false, features = ["std"] }
78
# tidy-alphabetical-start
89
rustc_abi = { path = "../rustc_abi" }
910
rustc_ast = { path = "../rustc_ast" }
@@ -50,7 +51,6 @@ rustc_trait_selection = { path = "../rustc_trait_selection" }
5051
rustc_ty_utils = { path = "../rustc_ty_utils" }
5152
serde_json = "1.0.59"
5253
shlex = "1.0"
53-
time = { version = "0.3.36", default-features = false, features = ["alloc", "formatting", "macros"] }
5454
tracing = { version = "0.1.35" }
5555
# tidy-alphabetical-end
5656

compiler/rustc_driver_impl/src/lib.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::path::{Path, PathBuf};
3030
use std::process::{self, Command, Stdio};
3131
use std::sync::OnceLock;
3232
use std::sync::atomic::{AtomicBool, Ordering};
33-
use std::time::{Instant, SystemTime};
33+
use std::time::Instant;
3434
use std::{env, str};
3535

3636
use rustc_ast as ast;
@@ -66,8 +66,6 @@ use rustc_session::{EarlyDiagCtxt, Session, config, filesearch};
6666
use rustc_span::FileName;
6767
use rustc_target::json::ToJson;
6868
use rustc_target::spec::{Target, TargetTuple};
69-
use time::OffsetDateTime;
70-
use time::macros::format_description;
7169
use tracing::trace;
7270

7371
#[allow(unused_macros)]
@@ -1304,13 +1302,8 @@ fn ice_path_with_config(config: Option<&UnstableOptions>) -> &'static Option<Pat
13041302
.or_else(|| std::env::current_dir().ok())
13051303
.unwrap_or_default(),
13061304
};
1307-
let now: OffsetDateTime = SystemTime::now().into();
1308-
let file_now = now
1309-
.format(
1310-
// Don't use a standard datetime format because Windows doesn't support `:` in paths
1311-
&format_description!("[year]-[month]-[day]T[hour]_[minute]_[second]"),
1312-
)
1313-
.unwrap_or_default();
1305+
// Don't use a standard datetime format because Windows doesn't support `:` in paths
1306+
let file_now = jiff::Zoned::now().strftime("%Y-%m-%dT%H_%M_%S");
13141307
let pid = std::process::id();
13151308
path.push(format!("rustc-ice-{file_now}-{pid}.txt"));
13161309
Some(path)

src/bootstrap/src/utils/proc_macro_deps.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ pub static CRATES: &[&str] = &[
3131
"mime_guess",
3232
"minimal-lexical",
3333
"nom",
34-
"num-conv",
3534
"once_cell",
3635
"pest",
3736
"pest_generator",
@@ -49,7 +48,6 @@ pub static CRATES: &[&str] = &[
4948
"syn",
5049
"synstructure",
5150
"thiserror",
52-
"time-core",
5351
"tinystr",
5452
"type-map",
5553
"typenum",

src/tools/tidy/src/deps.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
270270
"darling_core",
271271
"darling_macro",
272272
"datafrog",
273-
"deranged",
274273
"derive-where",
275274
"derive_setters",
276275
"digest",
@@ -311,6 +310,8 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
311310
"intl_pluralrules",
312311
"itertools",
313312
"itoa",
313+
"jiff",
314+
"jiff-static",
314315
"jobserver",
315316
"lazy_static",
316317
"leb128",
@@ -328,7 +329,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
328329
"miniz_oxide",
329330
"nix",
330331
"nu-ansi-term",
331-
"num-conv",
332332
"num_cpus",
333333
"object",
334334
"odht",
@@ -341,7 +341,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
341341
"pin-project-lite",
342342
"polonius-engine",
343343
"portable-atomic", // dependency for platforms doesn't support `AtomicU64` in std
344-
"powerfmt",
344+
"portable-atomic-util",
345345
"ppv-lite86",
346346
"proc-macro-hack",
347347
"proc-macro2",
@@ -394,9 +394,6 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
394394
"thorin-dwp",
395395
"thread_local",
396396
"tikv-jemalloc-sys",
397-
"time",
398-
"time-core",
399-
"time-macros",
400397
"tinystr",
401398
"tinyvec",
402399
"tinyvec_macros",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy