fix: nvim: julials add generation of precompile head & add readme

This commit is contained in:
qwjyh 2023-10-06 19:36:59 +09:00
parent 9e255a4477
commit 88961e0879
2 changed files with 42 additions and 1 deletions

View file

@ -1,6 +1,7 @@
# Add dependencies to Language Server project
# TODO: automatically list up necessary packages
using Pkg
@info "project path" Pkg.project().path
# add LanguageServer.jl
Pkg.add("LanguageServer")
@ -11,5 +12,18 @@ pkg_ls_deps = Pkg.dependencies()[pkg_ls].dependencies |> keys
foreach(Pkg.add, pkg_ls_deps)
# add extra dependencies
foreach(Pkg.add, ["Logging", "Sockets", "DataStructures"]) # these packages are manually collected
# these packages are manually collected
pkg_extra = ["Logging", "Sockets", "DataStructures", "Tar", "ArgTools"]
foreach(Pkg.add, pkg_extra)
@info "dependency added"
# save pkgs to be used for precompile functions with traced script
out_path = joinpath(Pkg.project().path |> dirname, "precompile_exec_head.jl")
@info "writing $(out_path)"
open(out_path, "w") do io
println(io, "using LanguageServer")
println(io, "using " * join(pkg_ls_deps, ", "))
println(io, "using " * join(pkg_extra, ", "))
end
@info "finished writing precompile head file"