Skip to content
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

Replace unmaintained humantime crate with jiff #15290

Merged
merged 1 commit into from
Mar 10, 2025
Merged

Conversation

oherrala
Copy link
Contributor

@oherrala oherrala commented Mar 10, 2025

The crate humantime appears to be unmaintained. There's open PR in RustSec's advisory-db about this: rustsec/advisory-db#2249

The crates clap and env_logger have already made the switch from humantime to jiff:

The jiff crate is already dependency on cargo via gix (albeit old 0.1 version, but that's probably fixed in next gix release):

jiff v0.1.29
└── gix-date v0.9.3
    ├── gix v0.70.0
    │   └── cargo v0.88.0 (/Users/oherrala/rust/cargo)

This PR shouldn't have any functional change to cargo itself.

@rustbot
Copy link
Collaborator

rustbot commented Mar 10, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. A-rebuild-detection Area: rebuild detection and fingerprinting A-timings Area: timings S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 10, 2025
@oherrala oherrala marked this pull request as draft March 10, 2025 20:26
@epage
Copy link
Contributor

epage commented Mar 10, 2025

- [DIRTY] foo v0.0.1 ([ROOT]/foo): the dependency foo was rebuilt ([TIME_DIFF_AFTER_LAST_BUILD])
+ [DIRTY] foo v0.0.1 ([ROOT]/foo): the dependency foo was rebuilt (1741638048.881853669s, PT1S after last build at 1741638047.743836231s)

Our regex at

// Following 3 subs redact:
// "1719325877.527949100s, 61549498ns after last build at 1719325877.466399602s"
// "1719503592.218193216s, 1h 1s after last build at 1719499991.982681034s"
// into "[DIRTY_REASON_NEW_TIME], [DIRTY_REASON_DIFF] after last build at [DIRTY_REASON_OLD_TIME]"
subs.insert(
"[TIME_DIFF_AFTER_LAST_BUILD]",
regex!(r"(?<redacted>[0-9]+(\.[0-9]+)?s, (\s?[0-9]+(\.[0-9]+)?(s|ns|h))+ after last build at [0-9]+(\.[0-9]+)?s)"),
)
.unwrap();
is not matching anymore to redact this test output

@epage epage marked this pull request as ready for review March 10, 2025 20:53
@epage epage enabled auto-merge March 10, 2025 20:53
@epage epage added this pull request to the merge queue Mar 10, 2025
Merged via the queue into rust-lang:master with commit 35cf085 Mar 10, 2025
23 checks passed
@oherrala oherrala deleted the jiff branch March 10, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: Command-line interface, option parsing, etc. A-rebuild-detection Area: rebuild detection and fingerprinting A-timings Area: timings S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants