Skip to content

Commit 41d23cc

Browse files
committed
ExplicitImports
1 parent f0f0f2b commit 41d23cc

File tree

4 files changed

+19
-27
lines changed

4 files changed

+19
-27
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Pardiso = "0.5.1"
4040
Requires = "1.1.3"
4141
Sparspak = "0.3.6"
4242
StaticArrays = "1.5.24"
43-
julia = "1.6"
43+
julia = "1.9"
4444

4545
[extras]
4646
AMGCLWrap = "4f76b812-4ba5-496d-b042-d70715554288"

src/ExtendableSparse.jl

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
module ExtendableSparse
2-
using SparseArrays,StaticArrays
3-
using LinearAlgebra
4-
using Sparspak
5-
using ILUZero
2+
3+
using DocStringExtensions: DocStringExtensions, SIGNATURES, TYPEDEF,TYPEDFIELDS
4+
using ILUZero: ILUZero, ldiv!, nnz
65
using OhMyThreads: @tasks
6+
using LinearAlgebra: LinearAlgebra, Diagonal, Hermitian, Symmetric, Tridiagonal,
7+
cholesky, cholesky!, convert, lu!, mul!, norm, transpose
8+
using SparseArrays: SparseArrays, AbstractSparseMatrix, SparseMatrixCSC,
9+
dropzeros!, findnz, nzrange, sparse, spzeros
10+
using Sparspak: Sparspak, sparspaklu, sparspaklu!
11+
using StaticArrays: StaticArrays, SMatrix, SVector
12+
using SuiteSparse: SuiteSparse
13+
import SparseArrays: AbstractSparseMatrixCSC, rowvals, getcolptr, nonzeros
714

8-
if !isdefined(Base, :get_extension)
9-
using Requires
10-
end
1115

1216
# Define our own constant here in order to be able to
1317
# test things at least a little bit..
@@ -17,9 +21,7 @@ if USE_GPL_LIBS
1721
using SuiteSparse
1822
end
1923

20-
using DocStringExtensions
2124

22-
import SparseArrays: AbstractSparseMatrixCSC, rowvals, getcolptr, nonzeros
2325

2426
include("matrix/sparsematrixcsc.jl")
2527
include("matrix/abstractsparsematrixextension.jl")
@@ -71,23 +73,6 @@ export AbstractFactorization, LUFactorization, CholeskyFactorization, SparspakLU
7173
export issolver
7274
export factorize!, update!
7375

74-
@static if !isdefined(Base, :get_extension)
75-
function __init__()
76-
@require Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" begin
77-
include("../ext/ExtendableSparsePardisoExt.jl")
78-
end
79-
@require IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895" begin
80-
include("../ext/ExtendableSparseIncompleteLUExt.jl")
81-
end
82-
@require AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" begin
83-
include("../ext/ExtendableSparseAlgebraicMultigridExt.jl")
84-
end
85-
@require AMGCLWrap = "4f76b812-4ba5-496d-b042-d70715554288" begin
86-
include("../ext/ExtendableSparseAMGCLWrapExt.jl")
87-
end
88-
end
89-
end
90-
9176
"""
9277
```
9378
ILUTPreconditioner(;droptol=1.0e-3)

test/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[deps]
22
AMGCLWrap = "4f76b812-4ba5-496d-b042-d70715554288"
33
AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c"
4+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
45
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
56
ChunkSplitters = "ae650224-84b6-46f8-82ea-d812ca08434e"
7+
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
68
ExtendableGrids = "cfc395e8-590f-11e8-1f13-43a2532b2fa8"
79
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
810
ILUZero = "88f59080-6952-5380-9ea5-54057fb9a43f"

test/runtests.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ using BenchmarkTools
88

99
using MultiFloats
1010
using ForwardDiff
11+
using ExplicitImports
1112

13+
@testset "ExplicitImports" begin
14+
@test ExplicitImports.check_no_implicit_imports(ExtendableSparse, allow_unanalyzable=(ExtendableSparse.Experimental,)) === nothing
15+
@test ExplicitImports.check_no_stale_explicit_imports(ExtendableSparse, allow_unanalyzable=(ExtendableSparse.Experimental,)) === nothing
16+
end
1217

1318
@testset "Parallel" begin
1419
include("test_parallel.jl")

0 commit comments

Comments
 (0)