From dc3045642ec94d18f988568821ba9b9cab8a7531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Fri, 8 Dec 2023 10:14:18 +0100 Subject: [PATCH] Migrate from SnoopPrecompile to PrecompileTools --- Project.toml | 4 ++-- src/JuMP.jl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index 17a122a187d..a487fbe1469 100644 --- a/Project.toml +++ b/Project.toml @@ -10,7 +10,7 @@ MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" -SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c" +PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [weakdeps] @@ -27,7 +27,7 @@ MathOptInterface = "1.19" MutableArithmetics = "1.1" OrderedCollections = "1" Printf = "1.6" -SnoopPrecompile = "1" +PrecompileTools = "1" SparseArrays = "1.6" Test = "1.6" julia = "1.6" diff --git a/src/JuMP.jl b/src/JuMP.jl index 74921041ccc..a34c607d2cd 100644 --- a/src/JuMP.jl +++ b/src/JuMP.jl @@ -1175,7 +1175,7 @@ export MOI # !!! note # -# The next codeblock is a SnoopPrecompile workflow that gets run when +# The next codeblock is a PrecompileTools workflow that gets run when # JuMP.jl is precompiled. Methods that are called here will be cached so # that they do not need to be compiled in every session. # @@ -1188,9 +1188,9 @@ export MOI # time-to-first solve (TTFX), then we likely need to add a new type of # constraint or objective to the precompile model. -import SnoopPrecompile +import PrecompileTools -SnoopPrecompile.@precompile_all_calls begin +PrecompileTools.@compile_workload begin # Because lots of the work is done by macros, and macros are expanded # at lowering time, not much of this would get precompiled without `@eval` @eval begin