Skip to content

Commit

Permalink
Removed plugin_runner app (#327)
Browse files Browse the repository at this point in the history
Removed plugin_runner app and moved its functionality into remote
control. The plugin runner app was due to expediency when that
functionality was in `lexical_plugin` and I thought that it would be
easier to put it in its own app.
Nah, just put it in remote_control
  • Loading branch information
scohen authored Aug 15, 2023
1 parent 1abd1bf commit c9f5b7c
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 99 deletions.
5 changes: 0 additions & 5 deletions apps/plugin_runner/.formatter.exs

This file was deleted.

26 changes: 0 additions & 26 deletions apps/plugin_runner/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions apps/plugin_runner/README.md

This file was deleted.

41 changes: 0 additions & 41 deletions apps/plugin_runner/mix.exs

This file was deleted.

1 change: 0 additions & 1 deletion apps/plugin_runner/test/test_helper.exs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ defmodule Lexical.RemoteControl.Application do
RemoteControl.ModuleMappings,
RemoteControl.Build,
RemoteControl.Build.CaptureServer,
RemoteControl.Compilation.Dispatch
RemoteControl.Compilation.Dispatch,
RemoteControl.Plugin.Runner.Supervisor,
RemoteControl.Plugin.Runner.Coordinator
]
else
[]
Expand Down
2 changes: 1 addition & 1 deletion apps/remote_control/lib/lexical/remote_control/plugin.ex
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
defmodule Lexical.RemoteControl.Plugin do
alias Lexical.Document
alias Lexical.Plugin.Runner
alias Lexical.Project
alias Lexical.RemoteControl
alias Lexical.RemoteControl.Api.Messages
alias Lexical.RemoteControl.Plugin.Runner

import Messages

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule Lexical.RemoteControl.Plugin.Discovery do
and the plugin will crash.
"""

alias Lexical.Plugin.Runner
alias Lexical.RemoteControl.Plugin.Runner
alias Mix.Tasks.Namespace

require Logger
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
defmodule Lexical.Plugin.Runner do
defmodule Lexical.RemoteControl.Plugin.Runner do
@moduledoc false

alias Lexical.Document
alias Lexical.Plugin.Runner
alias Lexical.Project
alias Lexical.RemoteControl.Plugin.Runner

require Logger

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
defmodule Lexical.Plugin.Runner.Coordinator do
defmodule Lexical.RemoteControl.Plugin.Runner.Coordinator do
@moduledoc false

alias Lexical.Formats
alias Lexical.Plugin.Runner.Coordinator.State
alias Lexical.RemoteControl.Plugin.Runner.Coordinator.State

require Logger
use GenServer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Lexical.Plugin.Runner.Coordinator.State do
defmodule Lexical.RemoteControl.Plugin.Runner.Coordinator.State do
@moduledoc false

alias Lexical.Plugin.Runner
alias Lexical.RemoteControl.Plugin.Runner

defstruct tasks: [], failures: %{}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Lexical.Plugin.Runner.Supervisor do
defmodule Lexical.RemoteControl.Plugin.Runner.Supervisor do
@moduledoc false

def child_spec(_) do
Expand Down
1 change: 0 additions & 1 deletion apps/remote_control/lib/mix/tasks/namespace.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ defmodule Mix.Tasks.Namespace do
"proto" => "Lexical",
"protocol" => "Lexical",
"remote_control" => "Lexical",
"plugin_runner" => "Lexical",
"server" => "Lexical"
}

Expand Down
1 change: 0 additions & 1 deletion apps/remote_control/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ defmodule Lexical.RemoteControl.MixProject do
{:lexical_test, path: "../../projects/lexical_test", only: :test},
{:lexical_plugin, path: "../../projects/lexical_plugin"},
{:common, in_umbrella: true},
{:plugin_runner, in_umbrella: true},
{:elixir_sense, git: "https://github.com/elixir-lsp/elixir_sense.git"},
{:patch, "~> 0.12", only: [:dev, :test], optional: true, runtime: false},
{:path_glob, "~> 0.2", optional: true},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ defmodule Lexical.RemoteControl.Build.StateTest do
alias Lexical.RemoteControl
alias Lexical.RemoteControl.Build
alias Lexical.RemoteControl.Build.State
alias Lexical.RemoteControl.Plugin

import Lexical.Test.EventualAssertions
import Lexical.Test.Fixtures
Expand All @@ -14,8 +15,8 @@ defmodule Lexical.RemoteControl.Build.StateTest do
setup do
{:ok, _} = start_supervised(Build.CaptureServer)
{:ok, _} = start_supervised(RemoteControl.ModuleMappings)
{:ok, _} = start_supervised(Lexical.Plugin.Runner.Coordinator)
{:ok, _} = start_supervised(Lexical.Plugin.Runner.Supervisor)
{:ok, _} = start_supervised(Plugin.Runner.Coordinator)
{:ok, _} = start_supervised(Plugin.Runner.Supervisor)
:ok
end

Expand Down Expand Up @@ -81,7 +82,7 @@ defmodule Lexical.RemoteControl.Build.StateTest do
test "it compiles after a timeout", %{state: state, document: document} do
state = State.on_file_compile(state, document)

refute_eventually State.compile_scheduled?(State.on_tick(state), document.uri), 500
refute_eventually(State.compile_scheduled?(State.on_tick(state), document.uri), 500)
end
end
end
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
defmodule Lexical.Plugin.Coordinator.StateTest do
defmodule Lexical.RemoteControl.Plugin.Coordinator.StateTest do
alias Lexical.Document
alias Lexical.Plugin.Runner
alias Lexical.Plugin.Runner.Coordinator.State
alias Lexical.Plugin.V1
alias Lexical.RemoteControl.Plugin.Runner
alias Lexical.RemoteControl.Plugin.Runner.Coordinator.State

use ExUnit.Case

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Lexical.Runner.CoordinatorTest do
defmodule Lexical.RemoteControl.Plugin.Runner.CoordinatorTest do
alias Lexical.Document
alias Lexical.Plugin.Runner
alias Lexical.Project
alias Lexical.RemoteControl.Plugin.Runner

use ExUnit.Case, async: false
import Lexical.Test.EventualAssertions
Expand Down

0 comments on commit c9f5b7c

Please sign in to comment.