Update Erlang and Elixir versions (#2637)

This commit is contained in:
Jonatan Kłosko 2024-06-07 14:13:40 +02:00 committed by GitHub
parent fed942463b
commit e88e5f02c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 24 additions and 48 deletions

View file

@ -89,7 +89,7 @@ with [Nerves](https://www.nerves-project.org/).
### Direct installation with Elixir ### Direct installation with Elixir
You can run Livebook on your own machine using just Elixir. You will need You can run Livebook on your own machine using just Elixir. You will need
[Elixir v1.15.2](https://elixir-lang.org/install.html) or later. [Elixir v1.16](https://elixir-lang.org/install.html) or later.
Livebook also requires the following Erlang applications: `inets`, Livebook also requires the following Erlang applications: `inets`,
`os_mon`, `runtime_tools`, `ssl` and `xmerl`. Those applications come `os_mon`, `runtime_tools`, `ssl` and `xmerl`. Those applications come
with most Erlang distributions but certain package managers may split with most Erlang distributions but certain package managers may split

View file

@ -73,7 +73,7 @@ defmodule Livebook.Intellisense do
%{code: formatted, code_markers: []} %{code: formatted, code_markers: []}
rescue rescue
error -> error in [SyntaxError, TokenMissingError, MismatchedDelimiterError] ->
code_marker = %{line: error.line, description: error.description, severity: :error} code_marker = %{line: error.line, description: error.description, severity: :error}
%{code: nil, code_markers: [code_marker]} %{code: nil, code_markers: [code_marker]}
end end

View file

@ -111,7 +111,12 @@ defmodule Livebook.MixProject do
{:earmark_parser, "~> 1.4"}, {:earmark_parser, "~> 1.4"},
{:ecto, "~> 3.10"}, {:ecto, "~> 3.10"},
{:phoenix_ecto, "~> 4.4"}, {:phoenix_ecto, "~> 4.4"},
{:aws_credentials, "~> 0.3.0", runtime: false}, # TODO: revert once the fix is released https://github.com/aws-beam/aws_credentials/pull/77
{:aws_credentials,
github: "dw-kihara/aws_credentials", branch: "feature/brushups_for_otp27", runtime: false},
# {:aws_credentials, "~> 0.3.0", runtime: false},
# TODO: remove once the fix is released https://github.com/erlsci/iso8601/pull/62
{:iso8601, github: "asakura/iso8601", branch: "feature/otp27", override: true},
{:aws_signature, "~> 0.3.0"}, {:aws_signature, "~> 0.3.0"},
{:mint_web_socket, "~> 1.0.0"}, {:mint_web_socket, "~> 1.0.0"},
{:protobuf, "~> 0.12.0"}, {:protobuf, "~> 0.12.0"},

View file

@ -1,5 +1,5 @@
%{ %{
"aws_credentials": {:hex, :aws_credentials, "0.3.0", "b452847b395495e7e26573fea884ad929e3895d54caf2694768b579a1de775a7", [:rebar3], [{:eini, "~> 2.2.4", [hex: :eini_beam, repo: "hexpm", optional: false]}, {:iso8601, "~> 1.3.1", [hex: :iso8601, repo: "hexpm", optional: false]}, {:jsx, "~> 3.1.0", [hex: :jsx, repo: "hexpm", optional: false]}], "hexpm", "b70b8f455b91bb5a306452e770a3b88b3df71924779ddcc0bc345d6627454432"}, "aws_credentials": {:git, "https://github.com/dw-kihara/aws_credentials.git", "b82a3fdf9db592453915c9bca1a7f305a70ef4ff", [branch: "feature/brushups_for_otp27"]},
"aws_signature": {:hex, :aws_signature, "0.3.2", "adf33bc4af00b2089b7708bf20e3246f09c639a905a619b3689f0a0a22c3ef8f", [:rebar3], [], "hexpm", "b0daf61feb4250a8ab0adea60db3e336af732ff71dd3fb22e45ae3dcbd071e44"}, "aws_signature": {:hex, :aws_signature, "0.3.2", "adf33bc4af00b2089b7708bf20e3246f09c639a905a619b3689f0a0a22c3ef8f", [:rebar3], [], "hexpm", "b0daf61feb4250a8ab0adea60db3e336af732ff71dd3fb22e45ae3dcbd071e44"},
"bandit": {:hex, :bandit, "1.5.2", "ed0a41c43a9e529c670d0fd48371db4027e7b80d43b1942893e17deb8bed0540", [:mix], [{:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 1.0", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "35ddbdce7e8a2a3c6b5093f7299d70832a43ed2f4a1852885a61d334cab1b4ad"}, "bandit": {:hex, :bandit, "1.5.2", "ed0a41c43a9e529c670d0fd48371db4027e7b80d43b1942893e17deb8bed0540", [:mix], [{:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 1.0", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "35ddbdce7e8a2a3c6b5093f7299d70832a43ed2f4a1852885a61d334cab1b4ad"},
"bypass": {:hex, :bypass, "2.1.0", "909782781bf8e20ee86a9cabde36b259d44af8b9f38756173e8f5e2e1fabb9b1", [:mix], [{:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "d9b5df8fa5b7a6efa08384e9bbecfe4ce61c77d28a4282f79e02f1ef78d96b80"}, "bypass": {:hex, :bypass, "2.1.0", "909782781bf8e20ee86a9cabde36b259d44af8b9f38756173e8f5e2e1fabb9b1", [:mix], [{:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "d9b5df8fa5b7a6efa08384e9bbecfe4ce61c77d28a4282f79e02f1ef78d96b80"},
@ -17,7 +17,7 @@
"finch": {:hex, :finch, "0.18.0", "944ac7d34d0bd2ac8998f79f7a811b21d87d911e77a786bc5810adb75632ada4", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "69f5045b042e531e53edc2574f15e25e735b522c37e2ddb766e15b979e03aa65"}, "finch": {:hex, :finch, "0.18.0", "944ac7d34d0bd2ac8998f79f7a811b21d87d911e77a786bc5810adb75632ada4", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "69f5045b042e531e53edc2574f15e25e735b522c37e2ddb766e15b979e03aa65"},
"floki": {:hex, :floki, "0.36.2", "a7da0193538c93f937714a6704369711998a51a6164a222d710ebd54020aa7a3", [:mix], [], "hexpm", "a8766c0bc92f074e5cb36c4f9961982eda84c5d2b8e979ca67f5c268ec8ed580"}, "floki": {:hex, :floki, "0.36.2", "a7da0193538c93f937714a6704369711998a51a6164a222d710ebd54020aa7a3", [:mix], [], "hexpm", "a8766c0bc92f074e5cb36c4f9961982eda84c5d2b8e979ca67f5c268ec8ed580"},
"hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"}, "hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"},
"iso8601": {:hex, :iso8601, "1.3.3", "994aff5dfe760f14a8c4f2d8c3cf500371bf1a8cf309c3c0cb510401064223e0", [:rebar3], [], "hexpm", "bcc7767d691e4d8a26e713f48da51abd951bec4e071ae841f371766f96b46834"}, "iso8601": {:git, "https://github.com/asakura/iso8601.git", "935daad09b86b610eab6f7b623573d8c6d0ffa84", [branch: "feature/otp27"]},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
"jose": {:hex, :jose, "1.11.10", "a903f5227417bd2a08c8a00a0cbcc458118be84480955e8d251297a425723f83", [:mix, :rebar3], [], "hexpm", "0d6cd36ff8ba174db29148fc112b5842186b68a90ce9fc2b3ec3afe76593e614"}, "jose": {:hex, :jose, "1.11.10", "a903f5227417bd2a08c8a00a0cbcc458118be84480955e8d251297a425723f83", [:mix, :rebar3], [], "hexpm", "0d6cd36ff8ba174db29148fc112b5842186b68a90ce9fc2b3ec3afe76593e614"},
"jsx": {:hex, :jsx, "3.1.0", "d12516baa0bb23a59bb35dccaf02a1bd08243fcbb9efe24f2d9d056ccff71268", [:rebar3], [], "hexpm", "0c5cc8fdc11b53cc25cf65ac6705ad39e54ecc56d1c22e4adb8f5a53fb9427f3"}, "jsx": {:hex, :jsx, "3.1.0", "d12516baa0bb23a59bb35dccaf02a1bd08243fcbb9efe24f2d9d056ccff71268", [:rebar3], [], "hexpm", "0c5cc8fdc11b53cc25cf65ac6705ad39e54ecc56d1c22e4adb8f5a53fb9427f3"},

View file

@ -171,7 +171,8 @@ defmodule Livebook.IntellisenseTest do
label: "iterator/2", label: "iterator/2",
kind: :type, kind: :type,
documentation: """ documentation: """
An iterator representing the associations in a map with keys of type `Key` and values of type `Value`. An iterator representing the associations in a map with keys of type `Key` and
values of type `Value`.
``` ```
@opaque iterator(key, value) @opaque iterator(key, value)
@ -466,7 +467,7 @@ defmodule Livebook.IntellisenseTest do
Compresses data with gz headers and checksum. Compresses data with gz headers and checksum.
``` ```
:zlib.gzip/1 :zlib.gzip(Data)
```\ ```\
""", """,
insert_text: "gzip(${})" insert_text: "gzip(${})"
@ -1048,10 +1049,11 @@ defmodule Livebook.IntellisenseTest do
label: "max/1", label: "max/1",
kind: :function, kind: :function,
documentation: """ documentation: """
Returns the first element of `List` that compares greater than or equal to all other elements of `List`. Returns the first element of `List` that compares greater than or equal to all
other elements of `List`.
``` ```
:lists.max/1 :lists.max(List)
```\ ```\
""", """,
insert_text: "max(${})" insert_text: "max(${})"
@ -1451,16 +1453,6 @@ defmodule Livebook.IntellisenseTest do
assert crypto =~ "This module provides a set of cryptographic functions." assert crypto =~ "This module provides a set of cryptographic functions."
end end
@tag :erl_docs
test "properly renders Erlang signature types list" do
context = eval(do: nil)
assert %{contents: [xmerl_callbacks]} =
Intellisense.get_details(":xmerl.callbacks(Mod)", 8, context, node())
assert xmerl_callbacks =~ "Result = [atom()]"
end
test "properly parses unicode" do test "properly parses unicode" do
context = eval(do: nil) context = eval(do: nil)
@ -1714,28 +1706,13 @@ defmodule Livebook.IntellisenseTest do
active_argument: 0, active_argument: 0,
items: [ items: [
%{ %{
signature: "map(fun, list1)", signature: "map(Fun, List1)",
arguments: ["fun", "list1"] arguments: ["Fun", "List1"]
} }
] ]
} = Intellisense.get_signature_items(":lists.map(", context, node()) } = Intellisense.get_signature_items(":lists.map(", context, node())
end end
@tag :erl_docs
test "shows signature with arguments for erlang modules with arrow signature" do
context = eval(do: nil)
assert %{
active_argument: 0,
items: [
%{
signature: "callbacks(Module)",
arguments: ["Module"]
}
]
} = Intellisense.get_signature_items(":xmerl.callbacks(", context, node())
end
test "shows signature with default argument being an anonymous function" do test "shows signature with default argument being an anonymous function" do
context = eval(do: nil) context = eval(do: nil)
@ -1770,9 +1747,6 @@ defmodule Livebook.IntellisenseTest do
assert %{active_argument: 1, items: [_item]} = assert %{active_argument: 1, items: [_item]} =
Intellisense.get_signature_items("Enum.map([1, 2], ", context, node()) Intellisense.get_signature_items("Enum.map([1, 2], ", context, node())
assert %{active_argument: 1, items: [_item]} =
Intellisense.get_signature_items("Enum.map([1, 2], fn", context, node())
assert %{active_argument: 1, items: [_item]} = assert %{active_argument: 1, items: [_item]} =
Intellisense.get_signature_items( Intellisense.get_signature_items(
"Enum.map([1, 2], fn x -> x * x end", "Enum.map([1, 2], fn x -> x * x end",
@ -1793,9 +1767,6 @@ defmodule Livebook.IntellisenseTest do
assert %{active_argument: 1, items: [_item]} = assert %{active_argument: 1, items: [_item]} =
Intellisense.get_signature_items("[1, 2] |> Enum.map(", context, node()) Intellisense.get_signature_items("[1, 2] |> Enum.map(", context, node())
assert %{active_argument: 1, items: [_item]} =
Intellisense.get_signature_items("[1, 2] |> Enum.map(fn", context, node())
assert %{active_argument: 1, items: [_item]} = assert %{active_argument: 1, items: [_item]} =
Intellisense.get_signature_items( Intellisense.get_signature_items(
"[1, 2] |> Enum.map(fn x -> x * x end", "[1, 2] |> Enum.map(fn x -> x * x end",

View file

@ -50,9 +50,9 @@ defmodule Livebook.RemoteIntellisenseTest do
File.mkdir_p!(@tmp_dir) File.mkdir_p!(@tmp_dir)
File.write!("#{@tmp_dir}/Elixir.RemoteModule.beam", bytecode) File.write!("#{@tmp_dir}/Elixir.RemoteModule.beam", bytecode)
elixir_path = :code.lib_dir(:elixir, :ebin) elixir_path = Path.join(:code.lib_dir(:elixir), "ebin")
:ok = :erpc.call(node, :code, :add_paths, [[~c"#{@tmp_dir}", elixir_path]]) :ok = :erpc.call(node, :code, :add_paths, [[~c"#{@tmp_dir}", ~c"#{elixir_path}"]])
{:ok, _} = :erpc.call(node, :application, :ensure_all_started, [:elixir]) {:ok, _} = :erpc.call(node, :application, :ensure_all_started, [:elixir])
{:module, RemoteModule} = :erpc.call(node, :code, :load_file, [RemoteModule]) {:module, RemoteModule} = :erpc.call(node, :code, :load_file, [RemoteModule])
:loaded = :erpc.call(node, :code, :module_status, [RemoteModule]) :loaded = :erpc.call(node, :code, :module_status, [RemoteModule])

View file

@ -1,6 +1,6 @@
elixir="1.16.2" elixir="1.17.0-rc.1"
otp="26.2.1" otp="27.0"
openssl="1.1.1s" openssl="1.1.1s"
rebar3="3.22.0" rebar3="3.22.0"
debian="bookworm-20240130-slim" debian="bookworm-20240513-slim"
ubuntu="focal-20231003" ubuntu="focal-20240530"