Skip to content

Hash for infinite ranges and arrays - #242

Merged
jishnub merged 1 commit into
masterfrom
jishnub/hash
Sep 3, 2026
Merged

jishnub merged 1 commit into
masterfrom
jishnub/hash

Conversation

@jishnub

@jishnub jishnub commented Sep 2, 2026

Copy link
Copy Markdown
Member

Adds hashing for infinite arrays/ranges. Currently, on master, this falls back to the AbstractArray method that doesn't work for infinite arrays. We add special methods here and in related packages.

julia> r = 1:1:∞

julia> hash(r)
ERROR: MethodError: no method matching trailing_zeros(::Infinities.InfiniteCardinal{0})

vs this PR

julia> hash(r)
0xaab73d4eb3b52f6d

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.37%. Comparing base (81070e5) to head (d7500b7).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/infhash.jl 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #242      +/-   ##
==========================================
+ Coverage   90.02%   90.37%   +0.35%     
==========================================
  Files          11       12       +1     
  Lines        1303     1330      +27     
==========================================
+ Hits         1173     1202      +29     
+ Misses        130      128       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jishnub
jishnub merged commit d19aee1 into master Sep 3, 2026
16 checks passed
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.

2 participants