Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation issues on Erlang 26.x #1207

Closed
midas opened this issue Feb 1, 2024 · 3 comments
Closed

Compilation issues on Erlang 26.x #1207

midas opened this issue Feb 1, 2024 · 3 comments

Comments

@midas
Copy link

midas commented Feb 1, 2024

Description

When compiling plug on Erlang 26.x (specifically 26.2.1 and 26.0.2) an error is raised:

==> plug
Compiling 1 file (.erl)
Compiling 40 files (.ex)

== Compilation error in file lib/plug/conn/utils.ex ==
** (ArgumentError) invalid right argument for operator "in", it expects a compile-time proper list or compile-time range on the right side when used in guard expressions, got: %{first: 65, last: 90, __struct__: Range, step: 1}
    (elixir 1.13.4) lib/kernel.ex:4245: Kernel.raise_on_invalid_args_in_2/1
    (elixir 1.13.4) expanding macro: Kernel.in/2
    lib/plug/conn/utils.ex:64: Plug.Conn.Utils.mt_first/2

Instructions to Reproduce

Assuming you manage your Erlang and Elixir version with asdf.

mix new compile_plug && cd compile_plug
echo 'erlang 26.2.1\nelixir 1.13.4\n' >> .tool-versions

Next, add {:plug, "~> 1.5"} to the deps section of the mix.exs file.

Finally run the following: mix deps.get && mix compile

The error documented above will be output to your console.

@josevalim
Copy link
Member

Elixir v1.13.4 does not support Erlang/OTP 26. You must upgrade to Elixir 1.15 at least. Check out the table here: https://hexdocs.pm/elixir/compatibility-and-deprecations.html#between-elixir-and-erlang-otp

@josevalim josevalim closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2024
@josevalim
Copy link
Member

Or v1.14.5.

@midas
Copy link
Author

midas commented Feb 1, 2024

Hi Jose! Thanks for the info. It is strange that there is a precompiled Elixir 1.13.4 for OTP 26 available. I noticed that there is not a precompiled Elixir 1.14.x, 1.15.x or 1.16.x for OTP 26. This is what led me down the wrong path. Hope you are well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants