Skip to content

Commit 874a226

Browse files
committed
move processes to app supervisor
1 parent ab416ec commit 874a226

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

apps/elixir_ls_debugger/lib/debugger.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ defmodule ElixirLS.Debugger do
2020
children =
2121
if Mix.env() != :test do
2222
[
23+
BreakpointCondition,
24+
{ModuleInfoCache, %{}},
2325
{Server, name: Server}
2426
]
2527
else

apps/elixir_ls_debugger/lib/debugger/server.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ defmodule ElixirLS.Debugger.Server do
177177

178178
@impl GenServer
179179
def init(opts) do
180-
{:ok, _} = BreakpointCondition.start_link([])
181-
{:ok, _} = ModuleInfoCache.start_link(%{})
182180
state = if opts[:output], do: %__MODULE__{output: opts[:output]}, else: %__MODULE__{}
183181
{:ok, state}
184182
end

apps/elixir_ls_debugger/test/debugger_test.exs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule ElixirLS.Debugger.ServerTest do
44
# between the debugger's tests and the fixture project's tests. Expect to see output printed
55
# from both.
66

7-
alias ElixirLS.Debugger.{Server, Protocol, BreakpointCondition}
7+
alias ElixirLS.Debugger.{Server, Protocol, BreakpointCondition, ModuleInfoCache}
88
use ElixirLS.Utils.MixTest.Case, async: false
99
use Protocol
1010

@@ -14,6 +14,8 @@ defmodule ElixirLS.Debugger.ServerTest do
1414
{:ok, packet_capture} = ElixirLS.Utils.PacketCapture.start_link(self())
1515
Process.group_leader(Process.whereis(ElixirLS.Debugger.Output), packet_capture)
1616

17+
{:ok, _} = start_supervised(BreakpointCondition)
18+
{:ok, _} = start_supervised({ModuleInfoCache, %{}})
1719
{:ok, server} = Server.start_link(name: Server)
1820

1921
on_exit(fn ->

0 commit comments

Comments
 (0)