chronotope / chrono-tz

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

parse-zoneinfo: replace rule parser with simple state machine #172

Open djc opened 5 months ago

djc commented 5 months ago

The raw diffstat of +4957/-371 doesn't look so attractive, but this account new tests (and accompanying data) that account for about 4400 of those lines added, so all in all this doesn't add that much more code than it deletes. The benchmark example suggests it is about 10x faster and it drops a pretty big dependency.

djc commented 5 months ago

So the package test fails because I've made chrono-tz-build depend on the FILES list newly duplicated in parse-zoneinfo (to help with the snapshot test), but this doesn't work for packaging (which tests against the published version). I guess we can keep the FILES list duplicated in the repo for now and drop it once we release a new version of parse-zoneinfo?

pitdicker commented 4 months ago

I'll have a look tomorrow (also on the other PR).