FlorianUekermann / rustls-acme

Apache License 2.0
136 stars 27 forks source link

Remove chrono dependency and use transitive time dependency #63

Open Rapptz opened 5 months ago

Rapptz commented 5 months ago

While adding this as a dependency to my project, I noticed my dependency tree kind of blew up due to the inclusion of chrono (it added unrelated things related to wasm and Android, for example). In an effort to reduce my dependency count I decided to port over the limited chrono functionality in this repository to use the pre-existing transitive time dependency from x509-parser instead.

I admit to not testing this code, but a look at the documentation, source code of both of these libraries, and running some cargo check to ensure this still compiles I believe the changes here are correct.

FlorianUekermann commented 5 months ago

Hi thanks for the PR. chrono might indeed be a bit unnecessary here. But before I remove it I would like to understand why you got so many extra indirect dependencies, because I don't see them in cargo tree:

├── chrono v0.4.31
│   ├── iana-time-zone v0.1.58
│   └── num-traits v0.2.17
│       [build-dependencies]
│       └── autocfg v1.1.0
Rapptz commented 5 months ago

For me, all the dependencies listed here were marked as active. This was changed during a refactor in 0.4.32 as seen here.

I'm testing my branch in production without issue for what it's worth.

Rapptz commented 3 months ago

I've fixed the conflicts in this PR. I've also used this in production for 1 cert renewal period (60 days) with no issues. I'm pretty sure the code as given is correct by this point.