Skip to content

Commit 4fc4a94

Browse files
authored
Migrate from SnoopPrecompile to PrecompileTools (#39)
1 parent 09629d9 commit 4fc4a94

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Project.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ version = "0.7.1"
77
Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"
88
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
99
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
10-
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
10+
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
1111

1212
[compat]
1313
Dictionaries = "0.3"
1414
JuMP = "1.4.0"
15-
SnoopPrecompile = "1"
15+
PrecompileTools = "1"
1616
julia = "1.6"

src/SparseVariables.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module SparseVariables
33
using Dictionaries
44
using JuMP
55
using LinearAlgebra
6-
using SnoopPrecompile
6+
using PrecompileTools
77

88
include("sparsearray.jl")
99
include("dictionaries.jl")
@@ -15,7 +15,7 @@ export IndexedVarArray
1515
export insertvar!
1616
export unsafe_insertvar!
1717

18-
@precompile_setup begin
18+
@setup_workload begin
1919
# Putting some things in `setup` can reduce the size of the
2020
# precompile file and potentially make loading faster.
2121
rs = 1:10
@@ -24,7 +24,7 @@ export unsafe_insertvar!
2424
sys = [:a, :b]
2525
m = Model()
2626

27-
@precompile_all_calls begin
27+
@compile_workload begin
2828
# all calls in this block will be precompiled, regardless of whether
2929
# they belong to your package or not (on Julia 1.8 and higher)
3030

0 commit comments

Comments
 (0)