Skip to content

chore(deps): Switch humantime to jiff#5944

Merged
epage merged 1 commit into
clap-rs:masterfrom
oherrala:jiff
Mar 10, 2025
Merged

chore(deps): Switch humantime to jiff#5944
epage merged 1 commit into
clap-rs:masterfrom
oherrala:jiff

Conversation

@oherrala

@oherrala oherrala commented Mar 8, 2025

Copy link
Copy Markdown
Contributor

humantime crate seems to be unmaintained and jiff is provides same functionality. According to crates.io's stats clap is the most downloaded user of humantime.

Since humantime crate is only used in one example code this shouldn't cause any bigger change to project.

This is alternative to #5943 as proposed by @epage in #5943 (comment).

Ref. rustsec/advisory-db#2249

Comment thread examples/typed-derive.rs
Comment thread examples/typed-derive.rs
@epage

epage commented Mar 8, 2025

Copy link
Copy Markdown
Member

I'm good with this to move forward; get the tests to pass and I'll merge it.

Humantime seems to be unmaintained and jiff provides same
functionality.
@oherrala

oherrala commented Mar 8, 2025

Copy link
Copy Markdown
Contributor Author

@epage Thanks! Tests passed now.

@oherrala
oherrala marked this pull request as ready for review March 8, 2025 20:12
@epage
epage merged commit 564e64e into clap-rs:master Mar 10, 2025
@oherrala
oherrala deleted the jiff branch March 10, 2025 16:54
github-merge-queue Bot pushed a commit to rust-lang/cargo that referenced this pull request Mar 10, 2025
<!--
Thanks for submitting a pull request 🎉! Here are some tips for you:

* If this is your first contribution, read "Cargo Contribution Guide"
first:
  https://doc.crates.io/contrib/
* Run `cargo fmt --all` to format your code changes.
* Small commits and pull requests are always preferable and easy to
review.
* If your idea is large and needs feedback from the community, read how:
  https://doc.crates.io/contrib/process/#working-on-large-features
* Cargo takes care of compatibility. Read our design principles:
  https://doc.crates.io/contrib/design.html
* When changing help text of cargo commands, follow the steps to
generate docs:

https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages
* If your PR is not finished, set it as "draft" PR or add "WIP" in its
title.
* It's ok to use the CI resources to test your PR, but please don't
abuse them.

### What does this PR try to resolve?

Explain the motivation behind this change.
A clear overview along with an in-depth explanation are helpful.

You can use `Fixes #<issue number>` to associate this PR to an existing
issue.

### How should we test and review this PR?

Demonstrate how you test this change and guide reviewers through your
PR.
With a smooth review process, a pull request usually gets reviewed
quicker.

If you don't know how to write and run your tests, please read the
guide:
https://doc.crates.io/contrib/tests

### Additional information

Other information you want to mention in this PR, such as prior arts,
future extensions, an unresolved problem, or a TODO list.
-->

The crate [`humantime`](https://crates.io/crates/humantime) appears to
be unmaintained. There's open PR in RustSec's advisory-db about this:
rustsec/advisory-db#2249

The crates [`clap`](https://crates.io/crates/clap) and
[`env_logger`](https://crates.io/crates/env_logger) have already made
the switch from `humantime` to [`jiff`](https://crates.io/crates/jiff):

 * clap-rs/clap#5944
 * rust-cli/env_logger#352

The `jiff` crate is already dependency on `cargo` via `gix` (albeit old
0.1 version, but that's probably fixed in [next gix
release](GitoxideLabs/gitoxide@3ae99a4)):

```
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants