Somewhat overdue I started to use OTP-28, and naturally one of the first things on the agenda was to run some QuickCheck tests. While doing so I was greeted with a new helpful message “Command is taking a long time, type Ctrl+G, then enter ‘i’ to interrupt”.
Not sure what the timeout is, but it seems to be less than 10 seconds.
I normally run tests for minutes, so no, it is not stuck, and no I don’t need this message. I couldn’t easily find (tried Google) how to disable it, hence my question?! (I can see that it could be useful in some cases, so having it on by default could be merited, but printing it on every long running operation is also questionable?)
This looks a bit silly:
7> test({30, s}).
...............................................................................................
.....(x10)..................................................................................
...............Command is taking a long time, type Ctrl+G, then enter 'i' to interrupt
...(x100).......................................................(x10)......(x1).......
Time limit reached: 30.0 seconds.
OK, passed 6667 tests
Seems like it’s always set to 5 seconds and it can’t be overriden. Perhaps this could be exposed via env var, e.g. shell_command_timeout that defaults to 5 seconds? And to disable it, one can just set it to infinitiy
I had planned to work on a PR, and if Lukas is away I can see you need some help with such intricate code But it would be good to know the motivation behind why it was added in general, and in this way in particular. In the past I’ve worked on PRs where it turned out it had already been discussed and ideas was rejected. So I’d like to do this in the most efficient way.
As far as I can see the original PR wasn’t even reviewed properly, so perhaps there is little discussion to reveal?!
I haven’t heard any discussions ( but I’m in wrong team) but when I asked, his answer was roughly
“It is there to help newbies, we can change that if many complains” now many have complained
I think it would be great if it is default on and we can remove it with some parameter.
As the code is currently written, it doesn’t look like it. Should be straightforward to do something similar to PR#10121 - are there many commands that have this paged output.
If you can trick io into returning infinity from io:rows/0 somehow it would solve the paging, but possibly that has other effects