Skip to content

Commit 6d5b7b8

Browse files
committed
Fix improper FFTW function deprecation
1 parent 00b9ea2 commit 6d5b7b8

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

base/deprecated.jl

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,15 +1438,24 @@ export Operators
14381438
# This mimics the structure as it was defined in Base to avoid directly breaking code
14391439
# that assumes this structure
14401440
module DFT
1441-
for f in [:bfft, :bfft!, :brfft, :dct, :dct!, :fft, :fft!, :fftshift, :idct, :idct!,
1442-
:ifft, :ifft!, :ifftshift, :irfft, :plan_bfft, :plan_bfft!, :plan_brfft,
1441+
for f in [:fftshift, :ifftshift]
1442+
@eval begin
1443+
function $f(args...; kwargs...)
1444+
error($f, " has been moved to the package AbstractFFTs.jl.\n",
1445+
"Run `Pkg.add(\"AbstractFFTs\")` to install AbstractFFTs then run ",
1446+
"`using AbstractFFTs` to load it.")
1447+
end
1448+
export $f
1449+
end
1450+
end
1451+
for f in [:bfft, :bfft!, :brfft, :dct, :dct!, :fft, :fft!, :idct, :idct!,
1452+
:ifft, :ifft!, :irfft, :plan_bfft, :plan_bfft!, :plan_brfft,
14431453
:plan_dct, :plan_dct!, :plan_fft, :plan_fft!, :plan_idct, :plan_idct!,
14441454
:plan_ifft, :plan_ifft!, :plan_irfft, :plan_rfft, :rfft]
1445-
pkg = endswith(String(f), "shift") ? "AbstractFFTs" : "FFTW"
14461455
@eval begin
14471456
function $f(args...; kwargs...)
1448-
error($f, " has been moved to the package $pkg.jl.\n",
1449-
"Run `Pkg.add(\"$pkg\")` to install $pkg then run `using $pkg` ",
1457+
error($f, " has been moved to the package FFTW.jl.\n",
1458+
"Run `Pkg.add(\"FFTW\")` to install FFTW then run `using FFTW` ",
14501459
"to load it.")
14511460
end
14521461
export $f

0 commit comments

Comments
 (0)