Skip to content

Commit

Permalink
Migrate from SnoopPrecompile to PrecompileTools (#3608)
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat authored Dec 8, 2023
1 parent 60dc624 commit 39c73e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/JuMP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand All @@ -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
Expand Down

0 comments on commit 39c73e7

Please sign in to comment.