From 70dfeee4f0cb7477a9473445685ac809ec1024d3 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Mon, 23 Mar 2026 08:40:15 +0100 Subject: [PATCH] Adapt to JuliaLang/julia#60718 backports. --- Project.toml | 2 +- src/CompilerCaching.jl | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 133fba9..2e86e50 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "CompilerCaching" uuid = "9db33cc3-5358-4881-8759-fa4194144afd" -version = "0.2.1" +version = "0.2.2" [workspace] projects = ["test", "examples"] diff --git a/src/CompilerCaching.jl b/src/CompilerCaching.jl index e66d5d4..62325cd 100644 --- a/src/CompilerCaching.jl +++ b/src/CompilerCaching.jl @@ -376,8 +376,11 @@ end # methods, causing lookups to fail or return stale global entries, so don't use the cache. # Use jl_get_specialization1 instead, which uses jl_matching_methods (not cached dispatch) # and returns compileable signatures (with proper vararg widening). -@static if VERSION >= v"1.14.0-DEV.1581" - # NOTE: is being backported +# Fixed in 1.14.0-DEV.1581, backported to 1.13.0-beta2, 1.12.5, and 1.11.9. +@static if (VERSION >= v"1.14.0-DEV.1581" || + v"1.13.0-beta2" <= VERSION < v"1.14-" || + v"1.12.5" <= VERSION < v"1.13-" || + v"1.11.9" <= VERSION < v"1.12-") @inline function method_instance(@nospecialize(f), @nospecialize(tt); world::UInt=Base.get_world_counter(), method_table::Union{Core.MethodTable,Nothing}=nothing)