mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-22 22:05:03 +08:00
* Show reconnect for all runtime types when applicable * Make it clear which runtime is the default * Show Mix.install restart suggestion only for standalone runtimes * Fix tests not to rely on the default runtime tab
21 lines
611 B
Elixir
21 lines
611 B
Elixir
defmodule Livebook.Runtime.NoopRuntime do
|
|
@moduledoc false
|
|
|
|
# A runtime that doesn't do any actual evaluation,
|
|
# thus not requiring any underlying resources.
|
|
|
|
defstruct []
|
|
|
|
def new(), do: %__MODULE__{}
|
|
|
|
defimpl Livebook.Runtime do
|
|
def connect(_), do: make_ref()
|
|
def disconnect(_), do: :ok
|
|
def evaluate_code(_, _, _, _, _ \\ []), do: :ok
|
|
def forget_evaluation(_, _), do: :ok
|
|
def drop_container(_, _), do: :ok
|
|
def handle_intellisense(_, _, _, _, _), do: :ok
|
|
def duplicate(_), do: {:ok, Livebook.Runtime.NoopRuntime.new()}
|
|
def standalone?(_runtime), do: false
|
|
end
|
|
end
|