Skip to content

Commit

Permalink
Migrate from SnoopPrecompile to PrecompileTools (domluna#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy authored Apr 25, 2023
1 parent 9985f2e commit 8db28f9
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 @@ -9,15 +9,15 @@ CommonMark = "a80b9123-70ca-4bc0-993e-6e3bcb318db6"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Tokenize = "0796e94c-ce3b-5d07-9a54-7f471281c624"

[compat]
CSTParser = "^3.3.5"
CommonMark = "0.5, 0.6, 0.7, 0.8"
DataStructures = "0.17, 0.18"
Glob = "1.3"
SnoopPrecompile = "1"
PrecompileTools = "1"
Tokenize = "^0.5.16"
julia = "1.0"

Expand Down
6 changes: 3 additions & 3 deletions src/other/precompile.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#! format: off
using SnoopPrecompile
@precompile_setup begin
using PrecompileTools
@setup_workload begin
dir = joinpath(@__DIR__,"..", "..")
str = raw"""
@noinline require_complete(m::Matching) =
m.inv_match === nothing && throw(ArgumentError("Backwards matching not defined. `complete` the matching first."))
"""
@precompile_all_calls begin
@compile_workload begin
format(dir)
for style = [DefaultStyle(), BlueStyle(), SciMLStyle(), YASStyle(), MinimalStyle()]
format_text(str, style)
Expand Down

0 comments on commit 8db28f9

Please sign in to comment.