Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from SnoopPrecompile to PrecompileTools #3608

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading