File tree Expand file tree Collapse file tree 3 files changed +46
-10
lines changed
language_server/lib/language_server Expand file tree Collapse file tree 3 files changed +46
-10
lines changed Original file line number Diff line number Diff line change @@ -49,12 +49,30 @@ defmodule ElixirLS.DebugAdapter do
49
49
end
50
50
51
51
defp warn_if_unsupported_version do
52
- with { :error , message } <- Utils.MinimumVersion . check_elixir_version ( ) do
53
- Output . debugger_important ( "WARNING: " <> message )
52
+ case Utils.MinimumVersion . check_elixir_version ( ) do
53
+ { :error , message } ->
54
+ Output . debugger_important ( message )
55
+ Process . sleep ( 5000 )
56
+ System . halt ( 1 )
57
+
58
+ { :warning , message } ->
59
+ Output . debugger_important ( message )
60
+
61
+ :ok ->
62
+ :ok
54
63
end
55
64
56
- with { :error , message } <- Utils.MinimumVersion . check_otp_version ( ) do
57
- Output . debugger_important ( "WARNING: " <> message )
65
+ case Utils.MinimumVersion . check_otp_version ( ) do
66
+ { :error , message } ->
67
+ Output . debugger_important ( message )
68
+ Process . sleep ( 5000 )
69
+ System . halt ( 1 )
70
+
71
+ { :warning , message } ->
72
+ Output . debugger_important ( message )
73
+
74
+ :ok ->
75
+ :ok
58
76
end
59
77
end
60
78
end
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ defmodule ElixirLS.Utils.MinimumVersion do
7
7
"Erlang OTP releases below 22 are not supported (Currently running OTP #{ otp_release } )" }
8
8
else
9
9
if otp_release == 26 and is_windows ( ) do
10
- { :error ,
10
+ { :warning ,
11
11
"Erlang OTP 26.0 and 26.1 have critical bugs on Windows. Please make sure OTP 26.2 or greater is installed" }
12
12
else
13
13
:ok
@@ -18,7 +18,7 @@ defmodule ElixirLS.Utils.MinimumVersion do
18
18
def check_elixir_version do
19
19
if Version . match? ( System . version ( ) , ">= 1.13.0" ) do
20
20
if Regex . match? ( ~r/ -/ , System . version ( ) ) do
21
- { :error ,
21
+ { :warning ,
22
22
"Only official elixir releases are supported. (Currently running v#{ System . version ( ) } )" }
23
23
else
24
24
:ok
Original file line number Diff line number Diff line change @@ -1730,12 +1730,30 @@ defmodule ElixirLS.LanguageServer.Server do
1730
1730
end
1731
1731
1732
1732
defp show_version_warnings do
1733
- with { :error , message } <- ElixirLS.Utils.MinimumVersion . check_elixir_version ( ) do
1734
- JsonRpc . show_message ( :warning , message )
1733
+ case ElixirLS.Utils.MinimumVersion . check_elixir_version ( ) do
1734
+ { :error , message } ->
1735
+ JsonRpc . show_message ( :error , message )
1736
+ Process . sleep ( 5000 )
1737
+ System . halt ( 1 )
1738
+
1739
+ { :warning , message } ->
1740
+ JsonRpc . show_message ( :warning , message )
1741
+
1742
+ :ok ->
1743
+ :ok
1735
1744
end
1736
1745
1737
- with { :error , message } <- ElixirLS.Utils.MinimumVersion . check_otp_version ( ) do
1738
- JsonRpc . show_message ( :warning , message )
1746
+ case ElixirLS.Utils.MinimumVersion . check_otp_version ( ) do
1747
+ { :error , message } ->
1748
+ JsonRpc . show_message ( :error , message )
1749
+ Process . sleep ( 5000 )
1750
+ System . halt ( 1 )
1751
+
1752
+ { :warning , message } ->
1753
+ JsonRpc . show_message ( :warning , message )
1754
+
1755
+ :ok ->
1756
+ :ok
1739
1757
end
1740
1758
1741
1759
case Dialyzer . check_support ( ) do
You can’t perform that action at this time.
0 commit comments