From 8232694274c585a3815bc236006814ee5958bf4f Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Mon, 24 Apr 2023 16:37:57 -0500 Subject: [PATCH] Migrate from SnoopPrecompile to PrecompileTools --- Project.toml | 4 ++-- src/SparseVariables.jl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index 23669b7..ca7cebe 100644 --- a/Project.toml +++ b/Project.toml @@ -7,10 +7,10 @@ version = "0.7.1" Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4" JuMP = "4076af6c-e467-56ae-b986-b466b2749572" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c" +PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" [compat] Dictionaries = "0.3" JuMP = "1.4.0" -SnoopPrecompile = "1" +PrecompileTools = "1" julia = "1.6" diff --git a/src/SparseVariables.jl b/src/SparseVariables.jl index b9b6908..9eb187a 100644 --- a/src/SparseVariables.jl +++ b/src/SparseVariables.jl @@ -3,7 +3,7 @@ module SparseVariables using Dictionaries using JuMP using LinearAlgebra -using SnoopPrecompile +using PrecompileTools include("sparsearray.jl") include("dictionaries.jl") @@ -15,7 +15,7 @@ export IndexedVarArray export insertvar! export unsafe_insertvar! -@precompile_setup begin +@setup_workload begin # Putting some things in `setup` can reduce the size of the # precompile file and potentially make loading faster. rs = 1:10 @@ -24,7 +24,7 @@ export unsafe_insertvar! sys = [:a, :b] m = Model() - @precompile_all_calls begin + @compile_workload begin # all calls in this block will be precompiled, regardless of whether # they belong to your package or not (on Julia 1.8 and higher)