Closed nullplay closed 8 months ago
Attention: 9 lines
in your changes are missing coverage. Please review.
Comparison is base (
2c17510
) 76.04% compared to head (6239cad
) 76.06%.
Files | Patch % | Lines |
---|---|---|
src/util/limits.jl | 66.66% | 7 Missing :warning: |
src/dimensions.jl | 0.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Something weird I have found:
julia> hash(1.0, UInt(123))
0x5bca7c69b794f75d
julia> hash(1.0f0, UInt(123))
0x5bca7c69b794f75d
julia> hash(limit(1.0f0), UInt(123))
0xab8298daf3de8022
julia> d = Dict{Any, String}(1.0=>"hello")
Dict{Any, String} with 1 entry:
1.0 => "hello"
julia> d[limit(1.0f0)]
"hello"
julia> for i = 1:10000
d[i] = "bar"
end
julia> d[limit(1.0f0)]
ERROR: KeyError: key limit(1.0) not found
Stacktrace:
[1] getindex(h::Dict{Any, String}, key::Limit{Float32})
@ Base ./dict.jl:482
[2] top-level scope
@ REPL[37]:1
Our problem is that isequal(1.0, limit(1.0f0)) == true
, which isn't really helpful for us when implementing shash
, as we'd really like different hashes for things with different types. I'm trying this out on https://github.com/willow-ahrens/Finch.jl/pull/363.
Hope this fixes the continuous tests on CI.