diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 05e2053..9f0ce61 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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: @@ -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 @@ -62,4 +51,3 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true - diff --git a/.github/workflows/JuliaNightly.yml b/.github/workflows/JuliaNightly.yml index 1fd7f5b..e325a1e 100644 --- a/.github/workflows/JuliaNightly.yml +++ b/.github/workflows/JuliaNightly.yml @@ -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 diff --git a/Project.toml b/Project.toml index 5b1b1b3..c8ea54e 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/Tricks.jl b/src/Tricks.jl index c8c8de3..64ce423 100644 --- a/src/Tricks.jl +++ b/src/Tricks.jl @@ -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 @@ -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.