From c8bd5c79a4e70e705e4e9a0e601ab9e6eaa4e4c9 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Thu, 25 Jun 2026 23:29:03 +0000 Subject: [PATCH 1/3] compat: Support upcoming TypeEgal FSMI wrappers The Base PR JuliaLang/julia#62001 is expected to spell exact closed type-object dispatch keys as Core.TypeEgal. Accept Core.TypeEq and Core.TypeEgal generated-function dispatch wrappers when they are available, while preserving the existing Type{Type{T}} path on older Julia versions. A <:T-style signature would also accept the new spelling, as discussed in Ferrite-FEM/Tensors.jl#249. The structural unwrap used here asks slightly less of the compiler, since it avoids solving the extra subtype relation in this generated-function helper path. AI disclosure: This commit was prepared with assistance from generative AI. The resulting PR should be checked carefully by a maintainer before merging. Co-authored-by: OpenAI Codex --- src/utils.jl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 628d31b..6e79f01 100755 --- a/src/utils.jl +++ b/src/utils.jl @@ -169,11 +169,20 @@ function code_typed_by_method(method::Method, @nospecialize(tt::Type), world::UI return frame.linfo, ci end -function (fsmi_generator::FSMIGenerator)(world::UInt, source, typed_fsmitype, fsmitype::Type{Type{T_}}, fargtypes) where T_ +if isdefined(Core, :TypeEgal) + function (fsmi_generator::FSMIGenerator)(world::UInt, source, typed_fsmitype, fsmitype::Union{Core.TypeEq, Core.TypeEgal}, fargtypes) + _generate_fsmi(fsmi_generator, world, source, typed_fsmitype, Base.type_parameter(fsmitype), fargtypes) + end +else + function (fsmi_generator::FSMIGenerator)(world::UInt, source, typed_fsmitype, fsmitype::Type{Type{T_}}, fargtypes) where T_ + _generate_fsmi(fsmi_generator, world, source, typed_fsmitype, T_, fargtypes) + end +end + +function _generate_fsmi(fsmi_generator::FSMIGenerator, world::UInt, source, typed_fsmitype, T, fargtypes) @nospecialize # get typed code of the inference function evaluated in get_slots # using the concrete argument types - T = T_ m = fsmi_generator.m stub = Core.GeneratedFunctionStub(identity, Core.svec(:var"#self#", :fsmi, :fargs), Core.svec()) fargtypes = Tuple{fargtypes...} # convert (types...) to Tuple{types...} From 0f8fd3554603f97a3098398e66aa9b0c7a97a363 Mon Sep 17 00:00:00 2001 From: Krastanov's agent Date: Sat, 12 Sep 2026 03:48:38 +0000 Subject: [PATCH 2/3] Prepare v1.0.8 with Julia TypeEgal compatibility --- CHANGELOG.md | 5 +++++ Project.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2537af6..42d9c5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # News +## v1.0.8 - 2026-09-12 + +- Fix construction of `@resumable` iterators on Julia 1.14 development versions + by accepting the compiler's new wrappers for type objects. + ## v1.0.7 - 2026-07-17 - Preserve standard logging macro metadata names, including `_group`, `event`, diff --git a/Project.toml b/Project.toml index ea7e435..e1d2713 100644 --- a/Project.toml +++ b/Project.toml @@ -5,7 +5,7 @@ license = "MIT" desc = "C# sharp style generators a.k.a. semi-coroutines for Julia." authors = ["Ben Lauwens and volunteer maintainers"] repo = "https://github.com/JuliaDynamics/ResumableFunctions.jl.git" -version = "1.0.7" +version = "1.0.8" [deps] Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" From 671df176887e8c2cac3b83b0bb15daef6255f333 Mon Sep 17 00:00:00 2001 From: Krastanov's agent Date: Sat, 12 Sep 2026 03:52:18 +0000 Subject: [PATCH 3/3] Allow Egal in the spelling dictionary --- .typos.toml | 1 + CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.typos.toml b/.typos.toml index 74ee494..c63a35f 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,4 +1,5 @@ [default.extend-words] +Egal = "Egal" ket = "ket" numer = "numer" diff --git a/CHANGELOG.md b/CHANGELOG.md index 42d9c5e..826656e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## v1.0.8 - 2026-09-12 - Fix construction of `@resumable` iterators on Julia 1.14 development versions - by accepting the compiler's new wrappers for type objects. + by accepting the compiler's `TypeEgal` type wrappers. ## v1.0.7 - 2026-07-17