elixir-lang / elixir-lang.github.com

Website for Elixir
elixir-lang.org
354 stars 822 forks source link

Observer docs ask to use unavailable Mix function #1733

Closed mjftw closed 12 months ago

mjftw commented 12 months ago

Here: https://elixir-lang.org/getting-started/debugging.html#observer

We are asked to run: Mix.ensure_application!(:wx)

However in my local environment this function does not exist.

$ iex -S mix 
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:20:20] [ds:20:20:10] [async-threads:1] [jit:ns]

Interactive Elixir (1.14.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Mix.ensure_application!(:runtime_tools)
** (UndefinedFunctionError) function Mix.ensure_application!/1 is undefined or private
    (mix 1.14.4) Mix.ensure_application!(:runtime_tools)

Has the function been depreciated but the docs not updated?

Version info:

$ iex --version
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:20:20] [ds:20:20:10] [async-threads:1] [jit:ns]

IEx 1.14.4 (compiled with Erlang/OTP 23)

System info:

$ uname -a
Linux merlin 6.2.0-34-generic #34~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep  7 13:12:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
josevalim commented 12 months ago

That's required from Elixir v1.15. Before there is no need. :) I will amend.

mjftw commented 12 months ago

Aaah okay, thanks :)