Logs are lost upon hitting enter when running iex -S mix

Hi,

I recently upgraded to Elixir 1.15.5 and I’m observing annoying behavior: when I start my application with iex -S mix logs output by the application disappear when I hit enter in the console.

Here’s a video showing the issue:

My system:
Elixir: 1.15.5
Erlang: 26.0
OS: MacOS 13.5.2
Shell: zsh 5.9

P.S: I tried with another mix application and I get the same behavior.

Perhaps someone knows what’s going on here, or has some tips.

Thanks!

Yes, it looks like logs “disappear” at some point. But also on your video, logs appear to be there if you scroll up a bit, aren’t they?

I think this issue is related to terminal, I used to have constant console warping issues on AWS EC2 instances, no idea what it was about.

Only the ones produced before I start interacting with the terminal.
The logs generated after I enter a command disappear completely when I enter a second command

EDIT: actually, this is incorrect. Whenever I enter a command the screen is cleared and the log messages that were outside of the screen can be recovered by scrolling up, but the messages that were visible are wiped forever

Sure, it must be related to the terminal. But the issue is not there when I switch to Elixir 1.14.

I wonder what changed between 1.14 and 1.15 that could cause something like this? I’ll investigate a bit more when I find some time.

1 Like

If anyone experiences the same issue: the problem disappears if you use Elixir 1.15.5 with Erlang 26.0.2 instead of 26.

I’m quite baffled, and I quickly searched the Erlang/OTP changelog for a possible explanation, but didn’t find any.

1 Like

I think it is the same bug as described in ticket OTP-18652 aka PR-7242.

2 Likes

I think it is the same bug as described in ticket OTP-18652 aka PR-7242.

Awesome! Thank you so much for the pointer. I was starting to believe that I was imagining things :laughing: