From 16631c32539e82ce1eec53fe5727a0f3d8f07d0f Mon Sep 17 00:00:00 2001 From: Nick Robinson Date: Fri, 25 Jul 2025 14:36:35 +0100 Subject: [PATCH 1/6] Try fix `static_method*` for Julia v1.12 --- src/Tricks.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tricks.jl b/src/Tricks.jl index c8c8de3..14a91af 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" + 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,7 @@ 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) + return Base.MethodList(ms, f_type.name) end # Like Core.Compiler.method_instances, but accepts f as a _type_ instead of an instance. From 92f746459546203d4eae6ba595b8557111654888 Mon Sep 17 00:00:00 2001 From: Nick Robinson Date: Fri, 25 Jul 2025 14:46:01 +0100 Subject: [PATCH 2/6] update ci --- .github/workflows/CI.yml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 05e2053..c1c5299 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,9 +13,9 @@ jobs: fail-fast: false matrix: version: - #- "1.0" is currently broken: https://github.com/oxinabox/Tricks.jl/issues/33 + #- "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.3" # most features work only on 1.3+ - "1" # Latest Release os: - ubuntu-latest @@ -29,17 +29,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 +52,3 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true - From 6d5a499b4b1a0e6a5051db4fd2e44770ee3f3697 Mon Sep 17 00:00:00 2001 From: Nick Robinson Date: Fri, 25 Jul 2025 14:54:58 +0100 Subject: [PATCH 3/6] fixup! Try fix `static_method*` for Julia v1.12 --- src/Tricks.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Tricks.jl b/src/Tricks.jl index 14a91af..64ce423 100644 --- a/src/Tricks.jl +++ b/src/Tricks.jl @@ -98,7 +98,7 @@ end function _method_table_all_edges_all_methods(f, T, world = Base.get_world_counter()) # 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 @@ -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) + @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. From b46bf34fe6965d109ad6d3539961f670a357f5eb Mon Sep 17 00:00:00 2001 From: Nick Robinson Date: Fri, 25 Jul 2025 14:57:08 +0100 Subject: [PATCH 4/6] fixup! update ci --- .github/workflows/JuliaNightly.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/JuliaNightly.yml b/.github/workflows/JuliaNightly.yml index 1fd7f5b..564b378 100644 --- a/.github/workflows/JuliaNightly.yml +++ b/.github/workflows/JuliaNightly.yml @@ -32,16 +32,6 @@ 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 From 54a0767f9c9b124bf51c20d584bc58ae4dbf0b78 Mon Sep 17 00:00:00 2001 From: Nick Robinson Date: Fri, 25 Jul 2025 15:17:08 +0100 Subject: [PATCH 5/6] Bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From a7e0e31a854ffa0997d05743393a52d87afd01b5 Mon Sep 17 00:00:00 2001 From: Nick Robinson Date: Tue, 29 Jul 2025 10:59:26 +0100 Subject: [PATCH 6/6] CI: run 1.11 and 1.12, drop windows and mac --- .github/workflows/CI.yml | 5 ++--- .github/workflows/JuliaNightly.yml | 7 ------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c1c5299..9f0ce61 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,13 +14,12 @@ jobs: 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" # Latest Release + - "1.11" + - "~1.12.0-rc1" os: - ubuntu-latest - - macOS-latest - - windows-latest arch: - x64 steps: diff --git a/.github/workflows/JuliaNightly.yml b/.github/workflows/JuliaNightly.yml index 564b378..e325a1e 100644 --- a/.github/workflows/JuliaNightly.yml +++ b/.github/workflows/JuliaNightly.yml @@ -17,15 +17,8 @@ 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