beacon-biosignals / StableHashTraits.jl

Compute hashes over any Julia object simply and reproducibly
MIT License
9 stars 3 forks source link

Support Julia 1.11 (hash version=4 only). #69

Closed haberdashPI closed 1 month ago

haberdashPI commented 1 month ago

Julia hash versions 1-3 have a number of components that make them unstable when Julia upgrades and in fact, they break sometimes when being compiled under Julia 1.11. (In normal use I seem to be able to call versions 1-3, but the tests fail in various ways that look like they are related to generated functions). We've just built a new hash version that should be much more stable and work on Julia 1.11 (#58), and the maintenance burden of keeping 1-3 working on newer Julia versions isn't something I have the bandwidth for.

Running tests in 1.11 also revealed a subtle bug in buffering, based on a I misunderstanding I had about the IOBuffer API. From what I can tell this did not lead to any correctness issues on earlier versions (because I was carefully resetting buffer state to make sure buffer positions lined up with the start of the array), but I was not following public API, and so it broke on 1.11. This was fixed by using take! instead of the gymnastics I was going through before.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.55%. Comparing base (99468ca) to head (603ca8f). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #69 +/- ## ========================================== + Coverage 93.50% 93.55% +0.04% ========================================== Files 7 7 Lines 662 667 +5 ========================================== + Hits 619 624 +5 Misses 43 43 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

haberdashPI commented 1 month ago

Awesome! Thanks @ericphanson.

I ran into some CI issues here as well. Seems as though there is a bug in the current release candidate of Julia:

https://github.com/JuliaLang/julia/issues/55978

I'll make your suggested changes and await a response to that issue.