Skip to content

Commit 46d27ef

Browse files
khamilowiczclaude
andcommitted
Fix Elixir 1.19 and OTP 28 compatibility
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent b529260 commit 46d27ef

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ erl_crash.dump
7474
*.beam
7575
/config/*.secret.exs
7676
.elixir_ls/
77+
/priv/plts/
7778

7879
### Elixir Patch ###
7980

lib/membrane_stream_plugin/utils.ex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ defmodule Membrane.Stream.Utils do
1414

1515
@spec get_parser(Format.Version.t()) :: {:ok, Format.parser_t()} | {:error, reason :: atom()}
1616
def get_parser(version) when is_supported_version(version) do
17-
{:ok, &@implementations[version].parse/1}
17+
module = @implementations[version]
18+
{:ok, &module.parse/1}
1819
end
1920

2021
def get_parser(_version), do: {:error, :unsupported_version}
2122

2223
@spec get_serializer(Format.Version.t()) ::
2324
{:ok, (Format.action_t() -> binary())} | {:error, reason :: atom()}
2425
def get_serializer(version) when is_supported_version(version) do
25-
{:ok, &@implementations[version].serialize/1}
26+
module = @implementations[version]
27+
{:ok, &module.serialize/1}
2628
end
2729

2830
def get_serializer(_version), do: {:error, :unsupported_version}

mix.exs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,16 @@ defmodule Membrane.Stream.Mixfile do
4040
[
4141
{:membrane_core, "~> 1.0"},
4242
{:membrane_file_plugin, "~> 0.16.0", only: :test},
43-
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
44-
{:dialyxir, ">= 0.0.0", only: :dev, runtime: false},
45-
{:credo, ">= 0.0.0", only: :dev, runtime: false}
43+
{:ex_doc, "~> 0.34", only: :dev, runtime: false},
44+
{:dialyxir, "~> 1.4", only: :dev, runtime: false},
45+
{:credo, "~> 1.7", only: :dev, runtime: false}
4646
]
4747
end
4848

4949
defp dialyzer() do
5050
opts = [
51-
flags: [:error_handling]
51+
flags: [:error_handling],
52+
plt_add_apps: [:mix, :syntax_tools]
5253
]
5354

5455
if System.get_env("CI") == "true" do

0 commit comments

Comments
 (0)