Skip to content

Commit

Permalink
Merge pull request #172 from timholy/teh/precompiletools
Browse files Browse the repository at this point in the history
Migrate from SnoopPrecompile to PrecompileTools
  • Loading branch information
willow-ahrens authored Apr 25, 2023
2 parents af40dc9 + 8a08937 commit 2f6acd9
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 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
RewriteTools = "5969e224-3634-4c61-9f66-721b69e98b8a"
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
SyntaxInterface = "b33eeca9-aacb-4496-a840-e75f1646a4fb"

[weakdeps]
Expand All @@ -24,7 +24,7 @@ Compat = "3.29, 4"
DataStructures = "0.18"
Requires = "1"
RewriteTools = "0.1"
SnoopPrecompile = "1"
PrecompileTools = "1"
SyntaxInterface = "0.2.1"
julia = "1.6.7"

Expand Down
6 changes: 3 additions & 3 deletions src/Finch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using RewriteTools.Rewriters
using Base.Iterators
using Base: @kwdef
using Random: randsubseq, AbstractRNG, default_rng
using SnoopPrecompile
using PrecompileTools
using Compat
using DataStructures

Expand Down Expand Up @@ -118,10 +118,10 @@ include("base/fsparse.jl")
end
end

@precompile_setup begin
@setup_workload begin
# Putting some things in `setup` can reduce the size of the
# precompile file and potentially make loading faster.
@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)
y = @fiber d(e(0.0))
Expand Down

0 comments on commit 2f6acd9

Please sign in to comment.