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 #172

Merged
merged 1 commit into from
Apr 25, 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 @@ 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