fix(julials): write using at the top level

This commit is contained in:
qwjyh 2025-03-03 16:19:46 +09:00
parent c9026eb842
commit 81e57446de

View file

@ -1,8 +1,9 @@
#!/usr/bin/julia #!/usr/bin/julia
project_path = joinpath(homedir(), ".julia", "environments", "nvim-lspconfig") project_path = joinpath(homedir(), ".julia", "environments", "nvim-lspconfig")
using Pkg
using PackageCompiler;
cd(project_path) do cd(project_path) do
@info "now at " pwd() @info "now at " pwd()
using Pkg
Pkg.activate(".") Pkg.activate(".")
Pkg.update() Pkg.update()
compile_traces = Iterators.filter(eachline("tracecompile.jl")) do line compile_traces = Iterators.filter(eachline("tracecompile.jl")) do line
@ -11,7 +12,6 @@ cd(project_path) do
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..."
using PackageCompiler;
create_sysimage(["LanguageServer"], sysimage_path = "sys-ls.so", precompile_execution_file = ["precompile_exec.jl"])' 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()'`)