From d104726b73cf788a73400f1b171acc4d118a4a68 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 25 Jun 2024 19:37:11 +0900 Subject: [PATCH] update: julials: automatically create tracecompile.jl file at setup --- bin/neovim/setup_julials.jl | 1 + bin/neovim/update_julials.jl | 1 + 2 files changed, 2 insertions(+) diff --git a/bin/neovim/setup_julials.jl b/bin/neovim/setup_julials.jl index 5c28658..f357963 100644 --- a/bin/neovim/setup_julials.jl +++ b/bin/neovim/setup_julials.jl @@ -4,6 +4,7 @@ if !ispath(project_path) try mkdir(project_path) @info "Created $(project_path)" + touch(joinpath(project_path, "tracecompile.jl")) catch e @error e @error dump(e) diff --git a/bin/neovim/update_julials.jl b/bin/neovim/update_julials.jl index 935848c..f2c81c4 100644 --- a/bin/neovim/update_julials.jl +++ b/bin/neovim/update_julials.jl @@ -4,6 +4,7 @@ cd(project_path) @info "now at " pwd() run(`julia --project=. -e 'using Pkg; Pkg.update()'`) compile_traces = Iterators.filter(eachline("tracecompile.jl")) do line + # Remove anonymous functions from compile trace !startswith(line, '#') && !occursin(r"\#\d+\#\d+", line) end |> join read("precompile_exec_head.jl", String) * compile_traces |> (b -> write("precompile_exec.jl", b))