diff --git a/Project.toml b/Project.toml index 24ef674d..145b659d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "CSV" uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" authors = ["Jacob Quinn "] -version = "0.10.9" +version = "0.10.10" [deps] CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193" @@ -12,7 +12,7 @@ Mmap = "a63ad114-7e13-5084-954f-fe012c677804" Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" PooledArrays = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" SentinelArrays = "91c51154-3ec4-41a3-a24f-3f23e20d615c" -SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c" +PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" WeakRefStrings = "ea10d353-3f73-51f8-a26c-33c1cb351aa5" @@ -25,7 +25,7 @@ InlineStrings = "1" Parsers = "2.2.4" PooledArrays = "0.5, 1.0" SentinelArrays = "1.2" -SnoopPrecompile = "1" +PrecompileTools = "1" Tables = "1.1" WeakRefStrings = "1.4" WorkerUtilities = "1.6" diff --git a/src/precompile.jl b/src/precompile.jl index 0be9d6e8..f3e86dac 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -1,10 +1,10 @@ -using SnoopPrecompile +using PrecompileTools -@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_DATA = "int,float,date,datetime,bool,null,str,catg,int_float\n1,3.14,2019-01-01,2019-01-01T01:02:03,true,,hey,abc,2\n2,NaN,2019-01-02,2019-01-03T01:02:03,false,,there,abc,3.14\n" - @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) CSV.File(IOBuffer(PRECOMPILE_DATA)) diff --git a/src/workload.jl b/src/workload.jl index c9b5e22e..25761f05 100644 --- a/src/workload.jl +++ b/src/workload.jl @@ -1,11 +1,11 @@ -using SnoopPrecompile +using PrecompileTools const PRECOMPILE_DATA = """"int,float,date,datetime,bool,null,str,catg,int_float 1,3.14,2019-01-01,2019-01-01T01:02:03,true,,hey,abc,2 2,NaN,2019-01-02,2019-01-03T01:02:03,false,,there,abc,3.14 """ -@precompile_all_calls begin +@compile_workload begin CSV.Context(IOBuffer(PRECOMPILE_DATA)) collect(CSV.Rows(IOBuffer(PRECOMPILE_DATA)))