Open alanj853 opened 3 months ago
@alanj853 I've stopped using this feature of Shoehorn, so I'm not in a good spot to help. If you or others can figuring it out and send a patch, I'll gladly merge and make a release. I think we can also bump the lowest version of OTP supported if it's hard to maintain backwards compatibility.
But is this not the main feature of shoehorn, to provide a means to restart applications that crash without having to go outside the VM?
It is.
With some more trial and error, I found that this is due to some change in Elixir 1.15.0. This all works fine with the 1.14.5. What is happening is the handle_event and handle_call implementations in lib/shoehorn/report_handler.ex are not being called anymore, even though init/1 is.
I think I have fixed the issue here: https://github.com/nerves-project/shoehorn/pull/138
Environment
elixir -v
): 1.16.3 OTP 26.2.5Current behavior
Shoehorn behaviour does not seem to be getting used at all.
Steps to reproduce
Expected behavior
Application should restart, and we should see Logger.info print messages
Actual Behaviour
Application exits, and does not restart. Also, there are no Logger.info prints at all, even if the prints in my_project/lib/my_project/shoehorn_handler.ex are switched to IO.puts/1, which shows the code is not being called at all I think.