WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit ee3cb3a

Browse files
authored
implement a 2-arg Base.hash instead of 1-arg (#27)
* Implement a 2-arg Base.hash() instead of 1-arg This prevents a ton of invalidations. * Update CI
1 parent 613a6e5 commit ee3cb3a

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

.github/workflows/CI.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,16 @@ jobs:
2525
arch:
2626
- x64
2727
steps:
28-
- uses: actions/checkout@v2
29-
- uses: julia-actions/setup-julia@v1
28+
- uses: actions/checkout@v5
29+
- uses: julia-actions/setup-julia@v2
3030
with:
3131
version: ${{ matrix.version }}
3232
arch: ${{ matrix.arch }}
33-
- uses: actions/cache@v1
34-
env:
35-
cache-name: cache-artifacts
36-
with:
37-
path: ~/.julia/artifacts
38-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
39-
restore-keys: |
40-
${{ runner.os }}-test-${{ env.cache-name }}-
41-
${{ runner.os }}-test-
42-
${{ runner.os }}-
33+
- uses: julia-actions/cache@v2
4334
- uses: julia-actions/julia-buildpkg@v1
4435
- uses: julia-actions/julia-runtest@v1
4536
- uses: julia-actions/julia-processcoverage@v1
46-
- uses: codecov/codecov-action@v1
37+
- uses: codecov/codecov-action@v5
4738
with:
4839
file: lcov.info
40+
token: ${{ secrets.GITHUB_TOKEN }}

src/length.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Base.convert(::Type{Length{U, T1}}, x::Length{U, T2}) where {U, T1 <: Number, T2
1616

1717
==(x::Length{U}, y::Length{U}) where U = x.value == y.value
1818
Base.isequal(x::Length{U}, y::Length{U}) where U = isequal(x.value, y.value)
19-
Base.hash(x::Length{U}) where U = hash(x.value, hash(U))
19+
Base.hash(x::Length{U}, h::UInt) where U = hash(hash(x.value, hash(U)), h)
2020

2121
# Operations
2222
# ----------

0 commit comments

Comments
 (0)