Skip to content

Commit 49ec520

Browse files
authored
Switch to new supervisor format introduced in Elixir 1.5 (#260)
* Switch to new supervisor format introduced in Elixir 1.5 * update changelog
1 parent 3b5a43c commit 49ec520

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Improvements:
44
- Vendor Jason library to prevent conflicts with user's code (thanks [Jason Axelson](https://github.com/axelson)) [#253](https://github.com/elixir-lsp/elixir-ls/pull/253)
5+
- Switch to new supervisor format (thanks [Jason Axelson](https://github.com/axelson)) [#260](https://github.com/elixir-lsp/elixir-ls/pull/260)
56

67
Bug Fixes:
78
- Formatting was returning invalid floating point number (thanks [Thanabodee Charoenpiriyakij](https://github.com/wingyplus)) [#250](https://github.com/elixir-lsp/elixir-ls/pull/250)

apps/debugger/lib/debugger.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ defmodule ElixirLS.Debugger do
77

88
@impl Application
99
def start(_type, _args) do
10-
import Supervisor.Spec, warn: false
11-
1210
# We don't start this as a worker because if the debugger crashes, we want
1311
# this process to remain alive to print errors
1412
ElixirLS.Debugger.Output.start(ElixirLS.Debugger.Output)
1513

1614
children = [
17-
worker(ElixirLS.Debugger.Server, [[name: ElixirLS.Debugger.Server]])
15+
{ElixirLS.Debugger.Server, name: ElixirLS.Debugger.Server}
1816
]
1917

2018
opts = [strategy: :one_for_one, name: ElixirLS.Debugger.Supervisor, max_restarts: 0]

apps/language_server/lib/language_server.ex

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ defmodule ElixirLS.LanguageServer do
66

77
@impl Application
88
def start(_type, _args) do
9-
import Supervisor.Spec, warn: false
10-
119
children = [
12-
worker(ElixirLS.LanguageServer.Server, [ElixirLS.LanguageServer.Server]),
13-
worker(ElixirLS.LanguageServer.JsonRpc, [[name: ElixirLS.LanguageServer.JsonRpc]]),
14-
worker(ElixirLS.LanguageServer.Providers.WorkspaceSymbols, [[]])
10+
{ElixirLS.LanguageServer.Server, ElixirLS.LanguageServer.Server},
11+
{ElixirLS.LanguageServer.JsonRpc, name: ElixirLS.LanguageServer.JsonRpc},
12+
{ElixirLS.LanguageServer.Providers.WorkspaceSymbols, []}
1513
]
1614

1715
opts = [strategy: :one_for_one, name: ElixirLS.LanguageServer.Supervisor, max_restarts: 0]

0 commit comments

Comments
 (0)