Skip to content

Commit

Permalink
move all workarounds for JuliaLang#28808 to the same place in generat…
Browse files Browse the repository at this point in the history
…e_precompile file (JuliaLang#32910)
  • Loading branch information
KristofferC authored and StefanKarpinski committed Aug 15, 2019
1 parent af1979b commit 4c4751d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions contrib/generate_precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,8 @@ function generate_precompile_statements()
# Extract the precompile statements from stderr
statements = Set{String}()
for statement in eachline(precompile_file_h)
# Main should be completely clean
occursin("Main.", statement) && continue
# check for `#x##s66` style variable names not in quotes
occursin(r"#\w", statement) &&
count(r"(?:#+\w+)+", statement) !=
count(r"\"(?:#+\w+)+\"", statement) && continue
push!(statements, statement)
end

Expand All @@ -162,9 +159,13 @@ function generate_precompile_statements()
# Execute the collected precompile statements
include_time = @elapsed for statement in sort(collect(statements))
# println(statement)
# Work around #28808
# Workarounds for #28808
occursin("\"YYYY-mm-dd\\THH:MM:SS\"", statement) && continue
statement == "precompile(Tuple{typeof(Base.show), Base.IOContext{Base.TTY}, Type{Vararg{Any, N} where N}})" && continue
# check for `#x##s66` style variable names not in quotes
occursin(r"#\w", statement) &&
count(r"(?:#+\w+)+", statement) !=
count(r"\"(?:#+\w+)+\"", statement) && continue
try
Base.include_string(PrecompileStagingArea, statement)
catch
Expand Down

0 comments on commit 4c4751d

Please sign in to comment.