Skip to content

Commit d5bd8f5

Browse files
committed
warn when running on elixir 1.12 and otp 24
Elixir 1.12 has broken support for OTP 24 typespec AST elixir-lang/elixir#11158 (comment)
1 parent ed613a8 commit d5bd8f5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ jobs:
2020
otp: 22.x
2121
- elixir: 1.12.x
2222
otp: 23.x
23-
- elixir: 1.12.x
24-
otp: 24.x
2523
- elixir: 1.13.x
2624
otp: 22.x
2725
- elixir: 1.13.x

apps/elixir_ls_utils/lib/minimum_version.ex

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ defmodule ElixirLS.Utils.MinimumVersion do
1212

1313
def check_elixir_version do
1414
if Version.match?(System.version(), ">= 1.12.3") do
15-
:ok
15+
otp_release = String.to_integer(System.otp_release())
16+
17+
if Version.match?(System.version(), "< 1.13.0") and otp_release == 24 do
18+
# see https://github.com/elixir-lang/elixir/pull/11158#issuecomment-981583298
19+
{:error,
20+
"Elixir 1.12 is not supported on OTP 24. (Currently running v#{System.version()} on OTP #{otp_release})"}
21+
else
22+
:ok
23+
end
1624
else
1725
{:error,
1826
"Elixir versions below 1.12.3 are not supported. (Currently running v#{System.version()})"}

0 commit comments

Comments
 (0)