From 30b0851d1c4e31ed4c9b6be4286a3308ddafd413 Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Wed, 25 Dec 2024 23:52:18 +0100 Subject: [PATCH 1/3] don't export deprecated functions `@deprecate` by default exports the passed functions, which I assume was not intended here. This actually causes precompilation errors on 1.12 since these functions are also declared public --- src/deprecations.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/deprecations.jl b/src/deprecations.jl index c17940db7e..d4511b7762 100644 --- a/src/deprecations.jl +++ b/src/deprecations.jl @@ -1,12 +1,12 @@ # Recursive Operations --> Functors.fmap @deprecate recursive_add!!(x, y) Functors.fmap( Utils.add!!, x, y; exclude=MLDataDevices.isleaf -) -@deprecate recursive_make_zero(x) Functors.fmap(Utils.zero, x; exclude=MLDataDevices.isleaf) +) false +@deprecate recursive_make_zero(x) Functors.fmap(Utils.zero, x; exclude=MLDataDevices.isleaf) false @deprecate recursive_make_zero!!(x) Functors.fmap( Utils.zero!!, x; exclude=MLDataDevices.isleaf -) +) false @deprecate recursive_copyto!(x, y) Functors.fmap( copyto!, x, y; exclude=MLDataDevices.isleaf -) -@deprecate recursive_map(f, args...) Functors.fmap(f, args...; exclude=MLDataDevices.isleaf) +) false +@deprecate recursive_map(f, args...) Functors.fmap(f, args...; exclude=MLDataDevices.isleaf) false From 49fdbec6d5979828e0ca66bc19299cee2f2c231c Mon Sep 17 00:00:00 2001 From: Simeon David Schaub Date: Fri, 27 Dec 2024 22:14:41 +0100 Subject: [PATCH 2/3] remove public declaration instead --- src/deprecations.jl | 10 +++++----- src/helpers/recursive_ops.jl | 4 ---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/deprecations.jl b/src/deprecations.jl index d4511b7762..c17940db7e 100644 --- a/src/deprecations.jl +++ b/src/deprecations.jl @@ -1,12 +1,12 @@ # Recursive Operations --> Functors.fmap @deprecate recursive_add!!(x, y) Functors.fmap( Utils.add!!, x, y; exclude=MLDataDevices.isleaf -) false -@deprecate recursive_make_zero(x) Functors.fmap(Utils.zero, x; exclude=MLDataDevices.isleaf) false +) +@deprecate recursive_make_zero(x) Functors.fmap(Utils.zero, x; exclude=MLDataDevices.isleaf) @deprecate recursive_make_zero!!(x) Functors.fmap( Utils.zero!!, x; exclude=MLDataDevices.isleaf -) false +) @deprecate recursive_copyto!(x, y) Functors.fmap( copyto!, x, y; exclude=MLDataDevices.isleaf -) false -@deprecate recursive_map(f, args...) Functors.fmap(f, args...; exclude=MLDataDevices.isleaf) false +) +@deprecate recursive_map(f, args...) Functors.fmap(f, args...; exclude=MLDataDevices.isleaf) diff --git a/src/helpers/recursive_ops.jl b/src/helpers/recursive_ops.jl index f7f91d66d6..55902151f2 100644 --- a/src/helpers/recursive_ops.jl +++ b/src/helpers/recursive_ops.jl @@ -110,7 +110,3 @@ For the following types it directly defines recursion rules: correctness of this implementation for specific usecases. """ function recursive_map end - -@compat(public, - (recursive_add!!, recursive_copyto!, recursive_eltype, - recursive_make_zero, recursive_map, recursive_make_zero!!)) From 540a74c618aa21dc6fb8d9bcb49d40743bffa4da Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sat, 28 Dec 2024 11:18:32 -0500 Subject: [PATCH 3/3] Update src/helpers/recursive_ops.jl --- src/helpers/recursive_ops.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/helpers/recursive_ops.jl b/src/helpers/recursive_ops.jl index 55902151f2..20339832fc 100644 --- a/src/helpers/recursive_ops.jl +++ b/src/helpers/recursive_ops.jl @@ -110,3 +110,5 @@ For the following types it directly defines recursion rules: correctness of this implementation for specific usecases. """ function recursive_map end + +@compat(public, (recursive_eltype,))