Skip to content

Commit 34b8d7a

Browse files
committed
Unreference LinearAlgebra only if env var is true
1 parent c909365 commit 34b8d7a

File tree

1 file changed

+51
-52
lines changed

1 file changed

+51
-52
lines changed

test/prune_old_LA.jl

Lines changed: 51 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,54 @@
1-
methods_to_delete =
2-
[
3-
:adjoint
4-
:transpose
5-
:inv
6-
:literal_pow
7-
:\
8-
:/
9-
:isapprox
10-
:copyto!
11-
:*
12-
:muladd
13-
:copyto!
14-
:isone
15-
:kron!
16-
:kron
17-
:^
18-
:exp
19-
:cis
20-
:log
21-
:sqrt
22-
:cbrt
23-
:inv
24-
:cos
25-
:sin
26-
:sincos
27-
:tan
28-
:cosh
29-
:sinh
30-
:tanh
31-
:acos
32-
:asin
33-
:atan
34-
:acosh
35-
:asinh
36-
:atanh
37-
:sec
38-
:sech
39-
:csc
40-
:csch
41-
:cot
42-
:coth
43-
:asec
44-
:asech
45-
:acsc
46-
:acot
47-
:acoth
48-
:acsch
49-
]
50-
51-
521
let
2+
methods_to_delete =
3+
[
4+
:adjoint
5+
:transpose
6+
:inv
7+
:literal_pow
8+
:\
9+
:/
10+
:isapprox
11+
:copyto!
12+
:*
13+
:muladd
14+
:copyto!
15+
:isone
16+
:kron!
17+
:kron
18+
:^
19+
:exp
20+
:cis
21+
:log
22+
:sqrt
23+
:cbrt
24+
:inv
25+
:cos
26+
:sin
27+
:sincos
28+
:tan
29+
:cosh
30+
:sinh
31+
:tanh
32+
:acos
33+
:asin
34+
:atan
35+
:acosh
36+
:asinh
37+
:atanh
38+
:sec
39+
:sech
40+
:csc
41+
:csch
42+
:cot
43+
:coth
44+
:asec
45+
:asech
46+
:acsc
47+
:acot
48+
:acoth
49+
:acsch
50+
]
51+
5352
prune_old_LA = parse(Bool, get(ENV, "JULIA_PRUNE_OLD_LA", "false"))
5453
LinalgSysImg = Base.PkgId(Base.UUID("37e2e46d-f89d-539d-b4ee-838fcccc9c8e"), "LinearAlgebra")
5554
LA = get(Base.loaded_modules, LinalgSysImg, nothing)
@@ -74,7 +73,7 @@ let
7473
if LA !== nothing && prune_old_LA
7574
@assert !hasmethod(*, Tuple{Matrix{Float64}, Matrix{Float64}})
7675
end
77-
Base.unreference_module(LinalgSysImg)
76+
prune_old_LA && Base.unreference_module(LinalgSysImg)
7877
end
7978

8079
pruned_old_LA = true

0 commit comments

Comments
 (0)