Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/engine/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ defmodule Engine.MixProject do
{:elixir_sense,
github: "elixir-lsp/elixir_sense", ref: "e3ddc403554050221a2fd19a10a896fa7525bc02"},
{:forge, path: "../forge"},
{:gen_lsp, "~> 0.11.3"},
{:gen_lsp, github: "Draggu/gen_lsp", branch: "restart"},
{:patch, "~> 0.15", only: [:dev, :test], runtime: false},
{:path_glob, "~> 0.2"},
{:phoenix_live_view, "~> 1.0", only: [:test], runtime: false},
Expand Down
4 changes: 2 additions & 2 deletions apps/engine/mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "e3ddc403554050221a2fd19a10a896fa7525bc02", [ref: "e3ddc403554050221a2fd19a10a896fa7525bc02"]},
"erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"},
"file_system": {:hex, :file_system, "1.1.1", "31864f4685b0148f25bd3fbef2b1228457c0c89024ad67f7a81a3ffbc0bbad3a", [:mix], [], "hexpm", "7a15ff97dfe526aeefb090a7a9d3d03aa907e100e262a0f8f7746b78f8f87a5d"},
"gen_lsp": {:hex, :gen_lsp, "0.11.3", "b530024296091531a8968234178f926fbb07a5453b2612ece7ef9b654bf90bc0", [:mix], [{:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.5 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:schematic, "~> 0.2.1", [hex: :schematic, repo: "hexpm", optional: false]}, {:typed_struct, "~> 0.3.0", [hex: :typed_struct, repo: "hexpm", optional: false]}], "hexpm", "a674de4b06cbc56311d13a0fdf69066837785ba9c90da54984e58f485fd019cb"},
"gen_lsp": {:git, "https://github.com/Draggu/gen_lsp.git", "0a72f67d07bbd18d508a63bcaa4fffe28d23d0c7", [branch: "restart"]},
"hpax": {:hex, :hpax, "1.0.3", "ed67ef51ad4df91e75cc6a1494f851850c0bd98ebc0be6e81b026e765ee535aa", [:mix], [], "hexpm", "8eab6e1cfa8d5918c2ce4ba43588e894af35dbd8e91e6e55c817bca5847df34a"},
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
"mime": {:hex, :mime, "2.0.6", "8f18486773d9b15f95f4f4f1e39b710045fa1de891fada4516559967276e4dc2", [:mix], [], "hexpm", "c9945363a6b26d747389aac3643f8e0e09d30499a138ad64fe8fd1d13d9b153e"},
Expand All @@ -29,7 +29,7 @@
"sourceror": {:hex, :sourceror, "1.10.1", "325753ed460fe9fa34ebb4deda76d57b2e1507dcd78a5eb9e1c41bfb78b7cdfe", [:mix], [], "hexpm", "288f3079d93865cd1e3e20df5b884ef2cb440e0e03e8ae393624ee8a770ba588"},
"spitfire": {:hex, :spitfire, "0.3.10", "19aea9914132456515e8f7d592f63ab9f3130876b0252e834d2390bdd8becb24", [:mix], [], "hexpm", "6a6a5f77eb4165249c76199cd2d01fb595bac9207aed3de551918ac1c2bc9267"},
"stream_data": {:hex, :stream_data, "1.2.0", "58dd3f9e88afe27dc38bef26fce0c84a9e7a96772b2925c7b32cd2435697a52b", [:mix], [], "hexpm", "eb5c546ee3466920314643edf68943a5b14b32d1da9fe01698dc92b73f89a9ed"},
"telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"},
"telemetry": {:hex, :telemetry, "1.4.1", "ab6de178e2b29b58e8256b92b382ea3f590a47152ca3651ea857a6cae05ac423", [:rebar3], [], "hexpm", "2172e05a27531d3d31dd9782841065c50dd5c3c7699d95266b2edd54c2dafa1c"},
"typed_struct": {:hex, :typed_struct, "0.3.0", "939789e3c1dca39d7170c87f729127469d1315dcf99fee8e152bb774b17e7ff7", [:mix], [], "hexpm", "c50bd5c3a61fe4e198a8504f939be3d3c85903b382bde4865579bc23111d1b6d"},
"websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"},
"websock_adapter": {:hex, :websock_adapter, "0.5.8", "3b97dc94e407e2d1fc666b2fb9acf6be81a1798a2602294aac000260a7c4a47d", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "315b9a1865552212b5f35140ad194e67ce31af45bcee443d4ecb96b5fd3f3782"},
Expand Down
20 changes: 17 additions & 3 deletions apps/expert/lib/expert/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,23 @@ defmodule Expert.Application do
end

children_spec = children(buffer: buffer_opts)
opts = [strategy: :one_for_one, name: Expert.Supervisor]

Supervisor.start_link(children_spec, opts)
opts = [strategy: :one_for_one, name: Expert.Supervisor, auto_shutdown: :any_significant]

case Supervisor.start_link(children_spec, opts) do
{:ok, pid} ->
spawn(fn ->
ref = Process.monitor(pid)

receive do
{:DOWN, ^ref, :process, _, _} ->
Logger.error("Expert application has terminated unexpectedly")
# Signifficant process we cant recover (like the GenLSP) has crashed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typos

Suggested change
# Signifficant process we cant recover (like the GenLSP) has crashed
# A significant process we can't recover from (like the GenLSP) has crashed.

:timer.apply_after(50, System, :halt, [1])
end
end)

{:ok, pid}
end
end

def children(opts) do
Expand Down
2 changes: 1 addition & 1 deletion apps/expert/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ defmodule Expert.MixProject do
# assume a roundtrip to a project node is made.
{:engine, path: "../engine", only: [:test]},
{:forge, path: "../forge"},
{:gen_lsp, "~> 0.11.3"},
{:gen_lsp, github: "Draggu/gen_lsp", branch: "restart"},
{:jason, "~> 1.4"},
{:patch, "~> 0.15", runtime: false, only: [:dev, :test]},
{:path_glob, "~> 0.2"},
Expand Down
Loading
Loading