Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit b7f03af

Browse files
Merge pull request #49 from shashi/s/fix-warnings
use Requires to suppress Cassette overwrite warnings
2 parents ceb3d57 + b52137c commit b7f03af

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

Project.toml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ DiffEqDiffTools = "01453d9d-ee7c-5054-8395-0335cb756afa"
1111
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
1212
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
1313
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
14+
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1415
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1516
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1617
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"

src/SparseDiffTools.jl

+13-8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ using SparseArrays, LinearAlgebra, BandedMatrices, BlockBandedMatrices,
66
using BlockBandedMatrices:blocksize,nblocks
77
using ForwardDiff: Dual, jacobian, partials, DEFAULT_CHUNK_THRESHOLD
88

9+
using Requires
910
using Cassette
1011
import Cassette: tag, untag, Tagged, metadata, hasmetadata, istagged, canrecurse
1112
import Cassette: tagged_new_tuple, ContextTagged, BindingMeta, DisableHooks, nametype
@@ -40,13 +41,17 @@ include("coloring/greedy_star2_coloring.jl")
4041
include("coloring/matrix2graph.jl")
4142
include("differentiation/compute_jacobian_ad.jl")
4243
include("differentiation/jaches_products.jl")
43-
include("program_sparsity/program_sparsity.jl")
44-
include("program_sparsity/sparsity_tracker.jl")
45-
include("program_sparsity/path.jl")
46-
include("program_sparsity/take_all_branches.jl")
47-
include("program_sparsity/terms.jl")
48-
include("program_sparsity/linearity.jl")
49-
include("program_sparsity/hessian.jl")
50-
include("program_sparsity/blas.jl")
44+
function __init__()
45+
@require Cassette="7057c7e9-c182-5462-911a-8362d720325c" begin
46+
include("program_sparsity/program_sparsity.jl")
47+
include("program_sparsity/sparsity_tracker.jl")
48+
include("program_sparsity/path.jl")
49+
include("program_sparsity/take_all_branches.jl")
50+
include("program_sparsity/terms.jl")
51+
include("program_sparsity/linearity.jl")
52+
include("program_sparsity/hessian.jl")
53+
include("program_sparsity/blas.jl")
54+
end
55+
end
5156

5257
end # module

0 commit comments

Comments
 (0)