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

SnoopPrecompile -> PrecompileTools #1088

Merged
merged 1 commit into from
May 9, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "CSV"
uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
authors = ["Jacob Quinn <quinn.jacobd@gmail.com>"]
version = "0.10.9"
version = "0.10.10"

[deps]
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
4 changes: 2 additions & 2 deletions src/workload.jl
Original file line number Diff line number Diff line change
@@ -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)))

Expand Down