fix: julials env (with sysimage)

This commit is contained in:
testuser 2025-02-03 13:05:35 +09:00
parent ddb9a620c9
commit 77df4f2c4f
2 changed files with 11 additions and 11 deletions

View file

@ -11,12 +11,12 @@ Pkg.add("PackageCompiler")
# add extra dependencies # add extra dependencies
# these packages are manually collected # these packages are manually collected
pkg_extra = ["Logging", "Sockets", "DataStructures", "Tar", "ArgTools", "Dates", "Downloads", "TOML"] pkg_extra = ["Logging", "Sockets", "DataStructures", "Tar", "ArgTools", "Dates", "Downloads", "TOML", "JSONRPC", "SymbolServer"]
Pkg.add(pkg_extra) Pkg.add(pkg_extra)
@info "added dependencies" @info "added dependencies"
# Extra package to be executed in precompiled code # Extra package to be executed in precompiled code
pkg_precompiled = ["SymbolServer"] pkg_precompiled = []
# save pkgs to be used for precompile functions with traced script # save pkgs to be used for precompile functions with traced script
out_path = joinpath(Pkg.project().path |> dirname, "precompile_exec_head.jl") out_path = joinpath(Pkg.project().path |> dirname, "precompile_exec_head.jl")

View file

@ -3,14 +3,14 @@ project_path = joinpath(homedir(), ".julia", "environments", "nvim-lspconfig")
cd(project_path) do cd(project_path) do
@info "now at " pwd() @info "now at " pwd()
run(`julia --project=. -e 'using Pkg; Pkg.update()'`) run(`julia --project=. -e 'using Pkg; Pkg.update()'`)
# compile_traces = Iterators.filter(eachline("tracecompile.jl")) do line compile_traces = Iterators.filter(eachline("tracecompile.jl")) do line
# # Remove anonymous functions from compile trace # Remove anonymous functions from compile trace
# !startswith(line, '#') && !occursin(r"\#\d+\#\d+", line) && !occursin(r"\#\#printstyled\#", line) !startswith(line, '#') && !occursin(r"\#\d+\#\d+", line) && !occursin(r"\#\#printstyled\#", line)
# end |> join end |> join
# read("precompile_exec_head.jl", String) * compile_traces |> (b -> write("precompile_exec.jl", b)) read("precompile_exec_head.jl", String) * compile_traces |> (b -> write("precompile_exec.jl", b))
# @info "compiling sysimage..." @info "compiling sysimage..."
# run(`julia --project=. -e 'using PackageCompiler; create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])'`) run(`julia --project=. -e 'using PackageCompiler; create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])'`)
# @info "post precompile" @info "post precompile"
# run(`julia --project=. -J sys-ls.so -e 'using Pkg; Pkg.precompile()'`) run(`julia --project=. -J sys-ls.so -e 'using Pkg; Pkg.precompile()'`)
end end