Skip to content

Commit 48a5d1c

Browse files
authored
Revert "put chainrules core in a requires block, rm it from deps (#107)" (#108)
This reverts commit 3a3f0e4.
1 parent 27c37a0 commit 48a5d1c

File tree

3 files changed

+10
-30
lines changed

3 files changed

+10
-30
lines changed

Project.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@ uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
33
version = "1.3.1"
44

55
[deps]
6+
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
67
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
7-
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
88

9-
[compat]
10-
ChainRulesCore = "1"
11-
julia = "^1.0"
9+
[weakdeps]
10+
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
1211

1312
[extensions]
1413
AbstractFFTsChainRulesCoreExt = "ChainRulesCore"
1514

15+
[compat]
16+
ChainRulesCore = "1"
17+
julia = "^1.0"
18+
1619
[extras]
1720
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
1821
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
@@ -22,6 +25,3 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
2225

2326
[targets]
2427
test = ["ChainRulesCore", "ChainRulesTestUtils", "Random", "Test", "Unitful"]
25-
26-
[weakdeps]
27-
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

src/AbstractFFTs.jl

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,8 @@ export fft, ifft, bfft, fft!, ifft!, bfft!,
77

88
include("definitions.jl")
99

10-
@static if !isdefined(Base, :get_extension)
11-
import Requires
12-
end
13-
14-
@static if !isdefined(Base, :get_extension)
15-
function __init__()
16-
Requires.@require ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" begin
17-
include("../ext/AbstractFFTsChainRulesCoreExt.jl")
18-
end
19-
end
10+
if !isdefined(Base, :get_extension)
11+
include("../ext/AbstractFFTsChainRulesCoreExt.jl")
2012
end
2113

2214
end # module

test/runtests.jl

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
using AbstractFFTs
44
using AbstractFFTs: Plan
5+
using ChainRulesTestUtils
56

67
using LinearAlgebra
78
using Random
@@ -240,19 +241,6 @@ end
240241
end
241242

242243
@testset "ChainRules" begin
243-
244-
if isdefined(Base, :get_extension)
245-
CRCEXT = Base.get_extension(AbstractFFTs, :AbstractFFTsChainRulesCoreExt)
246-
@test isnothing(CRCEXT)
247-
end
248-
249-
using ChainRulesTestUtils
250-
251-
if isdefined(Base, :get_extension)
252-
CRCEXT = Base.get_extension(AbstractFFTs, :AbstractFFTsChainRulesCoreExt)
253-
@test !isnothing(CRCEXT)
254-
end
255-
256244
@testset "shift functions" begin
257245
for x in (randn(3), randn(3, 4), randn(3, 4, 5))
258246
for dims in ((), 1, 2, (1,2), 1:2)

0 commit comments

Comments
 (0)