Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ jobs:
fail-fast: false
matrix:
version:
#- "1.0" is currently broken: https://github.com/oxinabox/Tricks.jl/issues/33
#- "1.0" # LTS: limited compat features
- "1.3" # most features work only on 1.3+
#- "1.0" is currently broken: https://github.com/oxinabox/Tricks.jl/issues/33
- "1.3" # most features work only on 1.3+
- "1" # Latest Release
- "1.11"
- "~1.12.0-rc1"
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
steps:
Expand All @@ -29,17 +28,7 @@ jobs:
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v2
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.arch }}-test-
${{ runner.os }}-${{ matrix.arch }}-
${{ runner.os }}-
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
Expand All @@ -62,4 +51,3 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

19 changes: 1 addition & 18 deletions .github/workflows/JuliaNightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,14 @@ jobs:
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x86
- x64
exclude:
# 32-bit Julia binaries are not available on macOS
- os: macOS-latest
arch: x86
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v2
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.arch }}-test-
${{ runner.os }}-${{ matrix.arch }}-
${{ runner.os }}-
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Tricks"
uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775"
authors = ["Frames White"]
version = "0.1.10"
version = "0.1.11"

[compat]
julia = "1.0"
Expand Down
12 changes: 8 additions & 4 deletions src/Tricks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ else
end

function _method_table_all_edges_all_methods(f, T, world = Base.get_world_counter())
mt = f.name.mt

# We add an edge to the MethodTable itself so that when any new methods
# are defined, it recompiles the function.
@static if VERSION < v"1.12.0-DEV.1531"
@static if VERSION < v"1.12.0-DEV"
mt = f.name.mt
mt_edges = Core.Compiler.vect(mt, Tuple{f,Vararg{Any}})
else
mt = Core.GlobalMethods
mt_edges = Core.Compiler.vect(Tuple{f, Vararg{Any}}, mt)
end

Expand Down Expand Up @@ -171,7 +171,11 @@ function _methods(@nospecialize(f_type), @nospecialize(t_type),
else
ms = Base.Method[_get_method(m) for m in mft if (mod === nothing || m.method.module ∈ mod)]
end
return Base.MethodList(ms, f_type.name.mt)
@static if VERSION < v"1.12.0-DEV"
return Base.MethodList(ms, f_type.name.mt)
else
return Base.MethodList(ms, f_type.name)
end
end

# Like Core.Compiler.method_instances, but accepts f as a _type_ instead of an instance.
Expand Down
Loading