Skip to content

Commit

Permalink
Switch to new supervisor format introduced in Elixir 1.5 (elixir-edit…
Browse files Browse the repository at this point in the history
…ors#260)

* Switch to new supervisor format introduced in Elixir 1.5

* update changelog
  • Loading branch information
axelson authored May 30, 2020
1 parent 3b5a43c commit 49ec520
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Improvements:
- 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)
- Switch to new supervisor format (thanks [Jason Axelson](https://github.com/axelson)) [#260](https://github.com/elixir-lsp/elixir-ls/pull/260)

Bug Fixes:
- Formatting was returning invalid floating point number (thanks [Thanabodee Charoenpiriyakij](https://github.com/wingyplus)) [#250](https://github.com/elixir-lsp/elixir-ls/pull/250)
Expand Down
4 changes: 1 addition & 3 deletions apps/debugger/lib/debugger.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ defmodule ElixirLS.Debugger do

@impl Application
def start(_type, _args) do
import Supervisor.Spec, warn: false

# We don't start this as a worker because if the debugger crashes, we want
# this process to remain alive to print errors
ElixirLS.Debugger.Output.start(ElixirLS.Debugger.Output)

children = [
worker(ElixirLS.Debugger.Server, [[name: ElixirLS.Debugger.Server]])
{ElixirLS.Debugger.Server, name: ElixirLS.Debugger.Server}
]

opts = [strategy: :one_for_one, name: ElixirLS.Debugger.Supervisor, max_restarts: 0]
Expand Down
8 changes: 3 additions & 5 deletions apps/language_server/lib/language_server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ defmodule ElixirLS.LanguageServer do

@impl Application
def start(_type, _args) do
import Supervisor.Spec, warn: false

children = [
worker(ElixirLS.LanguageServer.Server, [ElixirLS.LanguageServer.Server]),
worker(ElixirLS.LanguageServer.JsonRpc, [[name: ElixirLS.LanguageServer.JsonRpc]]),
worker(ElixirLS.LanguageServer.Providers.WorkspaceSymbols, [[]])
{ElixirLS.LanguageServer.Server, ElixirLS.LanguageServer.Server},
{ElixirLS.LanguageServer.JsonRpc, name: ElixirLS.LanguageServer.JsonRpc},
{ElixirLS.LanguageServer.Providers.WorkspaceSymbols, []}
]

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

0 comments on commit 49ec520

Please sign in to comment.