chronotope / chrono-tz

TimeZone implementations for rust-chrono from the IANA database
Other
235 stars 56 forks source link

feat: make dependency on 'chrono' optional (default is on) #93

Closed woshilapin closed 1 year ago

woshilapin commented 2 years ago

Please bear with me for a minute. I know the name of the crate is chrono-tz but technically, chrono-tz provides 2 features:

  1. build and expose the list of all timezones
  2. make use of all these exported data to integrate smoothly with chrono

The first item is useful by itself already. In my use case, I'm only using it to deserialize into a Tz (so it provides validation of the input string). We could imagine using these timezones to integrate with other libraries one day.

In this PR, I'm proposing to make chrono a feature (although, enabled by default).

I'm opening this PR as a draft. Even if I was able to make it work, I believe more work would be needed to make it less cluttered and easier to maintain (move every chrono related stuff into a chrono module, for example?). I'd be happy to make these improvements, but first, I'd like to see how other contributors feels about this whole idea of making chrono a feature.

djc commented 2 years ago

This makes sense to me -- I could see myself merging it if it ends up sufficiently clean.

Thanks for working on this, and sorry for the delayed response -- I've only recently taken up maintainership of this crate.

woshilapin commented 2 years ago

OK, thanks for the answer. I'll start working on a cleaner version when I have some time :sweat_smile:

djc commented 1 year ago

Going to close this for now due to inactivity. Feel free to reopen if you're still interested.