Skip to content

Warn in debugger if on an unsupported version of elixir #221

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

Merged
merged 1 commit into from
Apr 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions apps/debugger/lib/debugger/cli.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ defmodule ElixirLS.Debugger.CLI do
Application.ensure_all_started(:debugger, :permanent)
IO.puts("Started ElixirLS debugger v#{Launch.debugger_version()}")
Launch.print_versions()
warn_if_unsupported_version()
WireProtocol.stream_packets(&Server.receive_packet/1)
end

# Debugging does not work on Elixir 1.10.0-1.10.2:
# https://github.com/elixir-lsp/elixir-ls/issues/158
defp warn_if_unsupported_version do
elixir_version = System.version()

if Version.match?(elixir_version, ">= 1.10.0") && Version.match?(elixir_version, "< 1.10.3") do
message =
"WARNING: Debugging is not supported on Elixir #{elixir_version}. Please upgrade" <>
" to at least 1.10.3\n" <>
"more info: https://github.com/elixir-lsp/elixir-ls/issues/158"

Output.print_err(message)
end
end
end