Skip to content

feat!: replace chrono with jiff - #1198

Open
FalkWoldmann wants to merge 3 commits into
aws:mainfrom
FalkWoldmann:jiff-1
Open

FalkWoldmann wants to merge 3 commits into
aws:mainfrom
FalkWoldmann:jiff-1

Conversation

@FalkWoldmann

Copy link
Copy Markdown
Contributor

📬 Issue #, if available: #1191

✍️ Description of changes:

I replaced chrono with jiff 1 in aws_lambda_events and lambda-extension, since chrono's maintainer is winding it down (chronotope/chrono-tz#231). The timestamp fields are public, so both crates need a major, and jiff needs MSRV 1.85. I kept the JSON output the way chrono wrote it. jiff's Timestamp ends at 9999-12-30T22:00:00Z, so later values fail to deserialize now.

The semver job fails until you bump the version, and clippy on stable fails in lambda-runtime/src/diagnostic.rs on main too

🔏 By submitting this pull request

  • I confirm that I've ran cargo +nightly fmt.
  • I confirm that I've ran cargo clippy --fix.
  • I confirm that I've made a best effort attempt to update all relevant documentation.
  • I confirm that my contribution is made under the terms of the Apache 2.0 license.

`DateTime<Utc>` fields are now `jiff::Timestamp` and the duration
encodings wrap `jiff::SignedDuration`. For timestamps from year 0 on the
JSON stays as it was: RFC 3339 timestamps are still written with zero,
three, six or nine fractional digits. `Timestamp` ends at
9999-12-30T22:00:00Z, so later values no longer deserialize.
`LambdaLog::time`, `LambdaTelemetry::time` and `Span::start` are now
`jiff::Timestamp`. Telemetry from year 0 on is serialized as before.

This branch has not been deployed

No deployments
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.

1 participant