Skip to content

feat: Add jiff integration#323

Merged
Pr0methean merged 2 commits into
zip-rs:masterfrom
sorairolake:feature/jiff-integration
Mar 22, 2025
Merged

feat: Add jiff integration#323
Pr0methean merged 2 commits into
zip-rs:masterfrom
sorairolake:feature/jiff-integration

Conversation

@sorairolake

@sorairolake sorairolake commented Mar 21, 2025

Copy link
Copy Markdown
Contributor

Add jiff feature to this crate.

This enables converting last-modified zip::DateTime to and from jiff::civil::DateTime when this feature is enabled, similar to how converting last-modified zip::DateTime to and from chrono::NaiveDateTime when the chrono feature is enabled.

Comment thread Cargo.toml Outdated
deflate-zlib = ["flate2/zlib", "deflate-flate2"]
deflate-zlib-ng = ["flate2/zlib-ng", "deflate-flate2"]
deflate-zopfli = ["zopfli", "_deflate-any"]
jiff = ["dep:jiff"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would strongly encourage using jiff-02 here like what rust-postgres does: https://github.com/sfackler/rust-postgres/blob/490c4852492bb0adf63a83e3c4e8b2afc9e6bf54/postgres-types/Cargo.toml#L54

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the reason for using jiff-02 because jiff's API is not yet stable?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I would phrase it that way, but probably yes. If you just called it jiff, what would you do when jiff 1.0 comes out? Bumping it would be a semver breaking change.

Technically the same is true for chrono and time. I don't believe either have an official policy on when to do semver incompatible releases. But so many people depend on them that such releases would be a huge headache.

Which is why, as documents in Jiff's README, I'm planning to release jiff 1.0 this summer and commit to it indefinitely.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done.

@Pr0methean Pr0methean added this pull request to the merge queue Mar 22, 2025
Merged via the queue into zip-rs:master with commit ef8aa70 Mar 22, 2025
@Pr0methean Pr0methean mentioned this pull request Mar 22, 2025
@sorairolake sorairolake deleted the feature/jiff-integration branch March 23, 2025 00:12
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