Skip to content

Commit d3e05a6

Browse files
committed
Warn if OTP built without doc chunks
Fixes #751
1 parent 8d8eb42 commit d3e05a6

File tree

1 file changed

+9
-0
lines changed
  • apps/language_server/lib/language_server

1 file changed

+9
-0
lines changed

apps/language_server/lib/language_server/cli.ex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ defmodule ElixirLS.LanguageServer.CLI do
3838
"Running on elixir #{versions.current_elixir_version} on OTP #{versions.current_otp_version}"
3939
)
4040

41+
check_otp_doc_chunks()
42+
4143
Launch.limit_num_schedulers()
4244

4345
Mix.shell(ElixirLS.LanguageServer.MixShell)
@@ -82,4 +84,11 @@ defmodule ElixirLS.LanguageServer.CLI do
8284
raise message
8385
end
8486
end
87+
88+
def check_otp_doc_chunks() do
89+
if match?({:error, _}, Code.fetch_docs(:erlang)) do
90+
JsonRpc.show_message(:warning, "OTP compiled without EEP48 documentation chunks")
91+
Logger.warn("OTP compiled without EEP48 documentation chunks. Language features for erlang modules will run in limited mode. Please reinstall or rebuild OTP with approperiate flags.")
92+
end
93+
end
8594
end

0 commit comments

Comments
 (0)