Release v0.8.0

This commit is contained in:
Jonatan Kłosko 2022-12-08 20:53:14 +01:00
parent 2c684dca76
commit 361455cd4e
19 changed files with 350 additions and 311 deletions

View file

@ -3,7 +3,7 @@ set -e pipefail
main() { main() {
export MAKEFLAGS=-j$(getconf _NPROCESSORS_ONLN) export MAKEFLAGS=-j$(getconf _NPROCESSORS_ONLN)
elixir_vsn="${elixir_vsn:-1.14.0}" elixir_vsn="${elixir_vsn:-1.14.2}"
mkdir -p tmp/cache mkdir -p tmp/cache
. .github/scripts/app/bootstrap_otp_mac.sh . .github/scripts/app/bootstrap_otp_mac.sh

View file

@ -7,7 +7,7 @@ on:
- "v*.*.*" - "v*.*.*"
env: env:
otp: "25.0" otp: "25.0"
elixir: "1.14.0" elixir: "1.14.2"
jobs: jobs:
assets: assets:
outputs: outputs:

View file

@ -5,7 +5,7 @@ on:
env: env:
otp: "25.0" otp: "25.0"
elixir: "1.14.0" elixir: "1.14.2"
jobs: jobs:
build-application: build-application:

View file

@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [v0.8.0](https://github.com/livebook-dev/livebook/tree/v0.8.0) (2022-12-08)
### Added
- Introduced a mechanism for tracking how cells depend on each other and reevaluate only if necessary ([#1517](https://github.com/livebook-dev/livebook/pull/1517))
- Improved reproducibility of module definitions ([#1518](https://github.com/livebook-dev/livebook/pull/1518))
- Started persisting modules bytecode to disk ([#1521](https://github.com/livebook-dev/livebook/pull/1521))
- Support for doctests, now running automatically ([#1525](https://github.com/livebook-dev/livebook/pull/1525))
- Support for image input ([#1538](https://github.com/livebook-dev/livebook/pull/1538))
- Environment variable for setting app base path, useful when deploying behind a proxy ([#1549](https://github.com/livebook-dev/livebook/pull/1549))
- Rendering math in on-hover documentation ([#1566](https://github.com/livebook-dev/livebook/pull/1566))
- Support for monospace font in textarea input ([#1565](https://github.com/livebook-dev/livebook/pull/1565))
- Added "Neural Network task" and "Slack message" to predefined Smart cells
### Changed
- Made the textarea input resize automatically to fit the content ([#1552](https://github.com/livebook-dev/livebook/pull/1552))
## [v0.7.2](https://github.com/livebook-dev/livebook/tree/v0.7.2) (2022-10-26) ## [v0.7.2](https://github.com/livebook-dev/livebook/tree/v0.7.2) (2022-10-26)
### Added ### Added

View file

@ -1,6 +1,6 @@
# Stage 1 # Stage 1
# Builds the Livebook release # Builds the Livebook release
FROM hexpm/elixir:1.14.0-erlang-24.3.4.2-debian-bullseye-20210902-slim AS build FROM hexpm/elixir:1.14.2-erlang-24.3.4.2-debian-bullseye-20210902-slim AS build
RUN apt-get update && apt-get upgrade -y && \ RUN apt-get update && apt-get upgrade -y && \
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
@ -39,7 +39,7 @@ RUN mix do compile, release livebook
# We use the same base image, because we need Erlang, Elixir and Mix # We use the same base image, because we need Erlang, Elixir and Mix
# during runtime to spawn the Livebook standalone runtimes. # during runtime to spawn the Livebook standalone runtimes.
# Consequently the release doesn't include ERTS as we have it anyway. # Consequently the release doesn't include ERTS as we have it anyway.
FROM hexpm/elixir:1.14.0-erlang-24.3.4.2-debian-bullseye-20210902-slim FROM hexpm/elixir:1.14.2-erlang-24.3.4.2-debian-bullseye-20210902-slim
RUN apt-get update && apt-get upgrade -y && \ RUN apt-get update && apt-get upgrade -y && \
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \

View file

@ -2,7 +2,7 @@
```elixir ```elixir
Mix.install([ Mix.install([
{:kino, "~> 0.7.0"} {:kino, "~> 0.8.0"}
]) ])
``` ```
@ -159,6 +159,17 @@ above to see them.
<!-- livebook:{"branch_parent_index":0} --> <!-- livebook:{"branch_parent_index":0} -->
## Kino.Tree
By default cell results are inspected with a limit on the text size. Inspecting large data structures with no limit makes the representation impractical to read, that's where `Kino.Tree` comes in!
```elixir
data = Process.info(self())
Kino.Tree.new(data)
```
<!-- livebook:{"branch_parent_index":0} -->
## Kino.render/1 ## Kino.render/1
As we saw, Livebook automatically recognises widgets returned As we saw, Livebook automatically recognises widgets returned

View file

@ -2,8 +2,8 @@
```elixir ```elixir
Mix.install([ Mix.install([
{:maplibre, "~> 0.1.2"}, {:maplibre, "~> 0.1.3"},
{:kino_maplibre, "~> 0.1.3"} {:kino_maplibre, "~> 0.1.7"}
]) ])
``` ```

View file

@ -2,8 +2,8 @@
```elixir ```elixir
Mix.install([ Mix.install([
{:vega_lite, "~> 0.1.4"}, {:vega_lite, "~> 0.1.6"},
{:kino_vega_lite, "~> 0.1.1"} {:kino_vega_lite, "~> 0.1.7"}
]) ])
``` ```

View file

@ -2,7 +2,7 @@
```elixir ```elixir
Mix.install([ Mix.install([
{:kino, "~> 0.7.0"} {:kino, "~> 0.8.0"}
]) ])
``` ```

View file

@ -2,7 +2,7 @@
```elixir ```elixir
Mix.install([ Mix.install([
{:kino, "~> 0.7.0"} {:kino, "~> 0.8.0"}
]) ])
``` ```

View file

@ -2,7 +2,7 @@
```elixir ```elixir
Mix.install([ Mix.install([
{:kino, "~> 0.7.0"} {:kino, "~> 0.8.0"}
]) ])
``` ```

View file

@ -2,8 +2,8 @@
```elixir ```elixir
Mix.install([ Mix.install([
{:kino, "~> 0.6.1"}, {:kino, "~> 0.8.0"},
{:jason, "~> 1.3"} {:jason, "~> 1.4"}
]) ])
``` ```

View file

@ -2,8 +2,8 @@
```elixir ```elixir
Mix.install([ Mix.install([
{:kino, "~> 0.7.0"}, {:kino, "~> 0.8.0"},
{:kino_vega_lite, "~> 0.1.4"} {:kino_vega_lite, "~> 0.1.7"}
]) ])
``` ```

View file

@ -19,17 +19,32 @@ defmodule Livebook.Runtime.ElixirStandalone do
kino_vega_lite = %{ kino_vega_lite = %{
name: "kino_vega_lite", name: "kino_vega_lite",
dependency: %{dep: {:kino_vega_lite, "~> 0.1.4"}, config: []} dependency: %{dep: {:kino_vega_lite, "~> 0.1.7"}, config: []}
} }
kino_db = %{ kino_db = %{
name: "kino_db", name: "kino_db",
dependency: %{dep: {:kino_db, "~> 0.2.0"}, config: []} dependency: %{dep: {:kino_db, "~> 0.2.1"}, config: []}
} }
kino_maplibre = %{ kino_maplibre = %{
name: "kino_maplibre", name: "kino_maplibre",
dependency: %{dep: {:kino_maplibre, "~> 0.1.3"}, config: []} dependency: %{dep: {:kino_maplibre, "~> 0.1.7"}, config: []}
}
kino_slack = %{
name: "kino_slack",
dependency: %{dep: {:kino_slack, "~> 0.1.0"}, config: []}
}
kino_bumblebee = %{
name: "kino_bumblebee",
dependency: %{dep: {:kino_bumblebee, "~> 0.1.0"}, config: []}
}
exla = %{
name: "exla",
dependency: %{dep: {:exla, "~> 0.4.1"}, config: [nx: [default_backend: EXLA.Backend]]}
} }
@extra_smart_cell_definitions [ @extra_smart_cell_definitions [
@ -117,6 +132,30 @@ defmodule Livebook.Runtime.ElixirStandalone do
} }
] ]
} }
},
%{
kind: "Elixir.KinoSlack.MessageCell",
name: "Slack message",
requirement: %{
variants: [
%{
name: "Default",
packages: [kino_slack]
}
]
}
},
%{
kind: "Elixir.KinoBumblebee.TaskCell",
name: "Neural Network task",
requirement: %{
variants: [
%{
name: "Default",
packages: [kino_bumblebee, exla]
}
]
}
} }
] ]

View file

@ -569,15 +569,7 @@ defmodule Livebook.Runtime.Evaluator do
defp eval(code, binding, env) do defp eval(code, binding, env) do
try do try do
quoted = Code.string_to_quoted!(code, file: env.file) quoted = Code.string_to_quoted!(code, file: env.file)
{value, binding, env} = Code.eval_quoted_with_env(quoted, binding, env, prune_binding: true)
# TODO: remove the else branch when we require Elixir v1.14.2
{value, binding, env} =
if function_exported?(Code, :eval_quoted_with_env, 4) do
Code.eval_quoted_with_env(quoted, binding, env, prune_binding: true)
else
Code.eval_quoted_with_env(quoted, binding, env)
end
{:ok, value, binding, env} {:ok, value, binding, env}
catch catch
kind, error -> kind, error ->

View file

@ -1,5 +1,3 @@
# TODO: remove the else branch when we require Elixir v1.14.2
if Version.compare(System.version(), "1.14.2") != :lt do
defmodule Livebook.Runtime.Evaluator.Doctests do defmodule Livebook.Runtime.Evaluator.Doctests do
@moduledoc false @moduledoc false
@ -303,8 +301,3 @@ if Version.compare(System.version(), "1.14.2") != :lt do
end end
end end
end end
else
defmodule Livebook.Runtime.Evaluator.Doctests do
def run(_modules), do: :ok
end
end

View file

@ -272,20 +272,6 @@ defmodule LivebookWeb.Output do
render_formatted_error_message(formatted) render_formatted_error_message(formatted)
end end
# TODO: remove on Livebook v0.7
defp render_output(output, %{})
when elem(output, 0) in [
:vega_lite_static,
:vega_lite_dynamic,
:table_dynamic,
:frame_dynamic
] do
render_error_message("""
Legacy output format: #{inspect(output)}. Please update Kino to
the latest version.
""")
end
defp render_output(output, %{}) do defp render_output(output, %{}) do
render_error_message(""" render_error_message("""
Unknown output format: #{inspect(output)}. If you're using Kino, Unknown output format: #{inspect(output)}. If you're using Kino,

View file

@ -2054,7 +2054,7 @@ defmodule LivebookWeb.SessionLive do
{:apply_cell_delta, _client_id, _cell_id, _tag, _delta, _revision} -> {:apply_cell_delta, _client_id, _cell_id, _tag, _delta, _revision} ->
update_dirty_status(data_view, data) update_dirty_status(data_view, data)
{:update_smart_cell, _client_id, _cell_id, _cell_state, _delta, _reevaluate} -> {:update_smart_cell, _client_id, _cell_id, _cell_state, _delta, _chunks, _reevaluate} ->
update_dirty_status(data_view, data) update_dirty_status(data_view, data)
# For outputs that update existing outputs we send the update directly # For outputs that update existing outputs we send the update directly

View file

@ -1,11 +1,11 @@
defmodule Livebook.MixProject do defmodule Livebook.MixProject do
use Mix.Project use Mix.Project
@elixir_requirement "~> 1.14" @elixir_requirement "~> 1.14.2"
@version "0.7.2" @version "0.8.0"
@description "Interactive and collaborative code notebooks - made with Phoenix LiveView" @description "Interactive and collaborative code notebooks - made with Phoenix LiveView"
@app_elixir_version "1.14.0" @app_elixir_version "1.14.2"
@app_rebar3_version "3.19.0" @app_rebar3_version "3.19.0"
def project do def project do