JuliaPhysics / JuliaPhysics/Unitful.jl
Correct hashing of unitful values
- Dominant language
- Julia
- Stars
- 675
- Forks
- 124
- Avg merge
- 3h 38m
- Merged PRs (30d)
- 1
Description
Reposted from https://github.com/JuliaData/DataFrames.jl/issues/2486.
Currently we have:
```
julia> isequal(1u"d", 24u"hr")
true
julia> hash(1u"d"), hash(24u"hr")
(0xc0114c5d5037b321, 0x34c298a544e80792)
```
and `hash` requires that if two values pass `isequal` test they must have the same hash.
CC @tomyun
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the implementations of hash and isequal for unitful values; the issue provides a reproducing example but names no files or tests. Ensure values that pass isequal, including 1u"d" and 24u"hr", produce the same hash, then add or run a regression check for that invariant.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100