elixir
elixir copied to clipboard
IO.gets/1 slowly expands expressions
Elixir and Erlang/OTP versions
Erlang/OTP 25 [erts-13.0.3] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns]
IEx 1.13.4 (compiled with Erlang/OTP 25)
Operating system
MacOS Monterey 12.6
Current behavior
Hey folks! I am not really sure if this is a bug - since expression expansion may be an undocumented feature for IO.gets/1. Regardless, the expansion still takes way longer than the regular expansion from iex (outside of IO.gets/1).
- Start fetching a line from stdin using
IO.gets("prefix: ") - Input some keys and press
tab - Stdin input will freeze and return the possible expression expansions after some good seconds
Expected behavior
I expected IO.gets/1 to not expand expressions when I press tab.
If expansion is a feature, I think it would be good to have it run as fast as the default expansion in IEX if possible.