update(julia): call Pkg
This commit is contained in:
parent
77df4f2c4f
commit
3491aed70b
2 changed files with 9 additions and 5 deletions
bin/neovim
|
@ -5,7 +5,8 @@ if !ispath(project_path)
|
|||
@info "Created $(project_path)"
|
||||
touch(joinpath(project_path, "tracecompile.jl"))
|
||||
end
|
||||
cmd = `julia --project=$(project_path) $(@__DIR__)/add_dependencies.jl`
|
||||
@info cmd
|
||||
run(cmd)
|
||||
|
||||
using Pkg
|
||||
Pkg.activate(project_path)
|
||||
include("$(@__DIR__)/add_dependencies.jl")
|
||||
|
||||
|
|
|
@ -2,14 +2,17 @@
|
|||
project_path = joinpath(homedir(), ".julia", "environments", "nvim-lspconfig")
|
||||
cd(project_path) do
|
||||
@info "now at " pwd()
|
||||
run(`julia --project=. -e 'using Pkg; Pkg.update()'`)
|
||||
using Pkg
|
||||
Pkg.activate(".")
|
||||
Pkg.update()
|
||||
compile_traces = Iterators.filter(eachline("tracecompile.jl")) do line
|
||||
# Remove anonymous functions from compile trace
|
||||
!startswith(line, '#') && !occursin(r"\#\d+\#\d+", line) && !occursin(r"\#\#printstyled\#", line)
|
||||
end |> join
|
||||
read("precompile_exec_head.jl", String) * compile_traces |> (b -> write("precompile_exec.jl", b))
|
||||
@info "compiling sysimage..."
|
||||
run(`julia --project=. -e 'using PackageCompiler; create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])'`)
|
||||
using PackageCompiler;
|
||||
create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])'
|
||||
@info "post precompile"
|
||||
run(`julia --project=. -J sys-ls.so -e 'using Pkg; Pkg.precompile()'`)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue