Skip to content

Commit 5331e12

Browse files
make generate_precompile a little more robust (#32850)
1 parent 70586ce commit 5331e12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/generate_precompile.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ function generate_precompile_statements()
138138
statements = Set{String}()
139139
for statement in eachline(precompile_file_h)
140140
occursin("Main.", statement) && continue
141+
# check for `#x##s66` style variable names not in quotes
142+
occursin(r"#\w", statement) &&
143+
count(r"(?:#+\w+)+", statement) !=
144+
count(r"\"(?:#+\w+)+\"", statement) && continue
141145
push!(statements, statement)
142146
end
143147

0 commit comments

Comments
 (0)