Open pitdicker opened 6 months ago
Thanks for doing the legwork on this! Will try to take a look soon.
Attention: Patch coverage is 48.06202%
with 67 lines
in your changes are missing coverage. Please review.
Project coverage is 91.52%. Comparing base (
ffe2745
) to head (9ba3069
). Report is 7 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
src/offset/local/unix.rs | 48.43% | 66 Missing :warning: |
src/offset/local/tz_info/timezone.rs | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Of course, and thank you.
Removed one commit that in the end didn't do much.
As a note: the reason to make everything methods on the Cache
type is because as a follow-up I not only want to set self.zone
but also for every source that is tried the inputs we should watch to invalidate the cache.
I've tried to review this, but I've found it challenging.
Most of the changes don't look like improvements to me -- they mostly add more code, and seem to make it all more complex. Tell me why/how I'm wrong?
When looking at it commit by commit it looks that way. Once you get to "Move parsing of TZ
variable to unix
module" we can start to share code that the previous commits where setting up for.
And this mostly prepares for the final commit in #1457. Could you give the end result a global look?
I'm really sorry but even after looking at all of the changes in #1457 today it doesn't seem more clear -- and it adds 80 lines of code, is that all for the new functionality? That seems to remove some tests so, if anything, seems to be undercounting library code. It seems to add lots of small functions which IMO just make it harder to follow the flow.
I put in the effort to slice the first commit of #1457 into 17 commits that each are readable as a refactor.
The goal is to move all logic for determining and parsing the time zone with fallbacks in one layer. This will make it possible to properly hook up errors, and to make the cache invalidation work beyond the most basic cases. But those improvements are not included in this PR.
The last commit, adding support for the
TZ_DIR
variable, is the only noticeable change in functionality.