diff --git a/Project.toml b/Project.toml index cd6ede1..494ba85 100644 --- a/Project.toml +++ b/Project.toml @@ -9,7 +9,7 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8" GadgetIO = "826b50da-1eb7-48f3-bd4b-d2350582c309" Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" -SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c" +PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" UnitfulAstro = "6112ee07-acf9-5e0f-b108-d242c714bf9f" @@ -20,7 +20,7 @@ Documenter = "0.25, 0.26, 0.27" DocumenterTools = "0.1" GadgetIO = "0.6, 0.7" Roots = "1, 2" -SnoopPrecompile = "1" +PrecompileTools = "1" Unitful = "1" UnitfulAstro = "1" julia = "1.6" diff --git a/src/GadgetUnits.jl b/src/GadgetUnits.jl index 0675408..dd4e38b 100644 --- a/src/GadgetUnits.jl +++ b/src/GadgetUnits.jl @@ -20,9 +20,9 @@ module GadgetUnits mJy_to_W - using SnoopPrecompile # this is a small dependency + using PrecompileTools # this is a small dependency - @precompile_setup begin + @setup_workload begin # Putting some things in `setup` can reduce the size of the # precompile file and potentially make loading faster. @@ -35,7 +35,7 @@ module GadgetUnits Int32(0), Int32(0), Int32(3), 0.0f0, Int32[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) - @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)