<div dir="ltr"><div dir="ltr"><div>You were definitely right. Only change I've done is that instead of using <font face="monospace">code:ensure_loaded/1</font> (which doesn't work in embedded mode, for the 3 people that use it in the world ^^_) I am using a simple <font face="monospace">catch test_event_handler:module_info(exports)</font> which seems to do the trick.</div><div><br></div><div>Thank you Jose,<br></div><div>r.</div></div><div class="gmail-yj6qo gmail-ajU" style="outline:none;padding:10px 0px;width:22px;margin:2px 0px 0px"><br class="gmail-Apple-interchange-newline"></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 15, 2019 at 10:20 AM Roberto Ostinelli <<a href="mailto:roberto@ostinelli.net">roberto@ostinelli.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>You were definitely right. Only change I've done is that instead of using <font face="monospace">code:ensure_loaded/1</font> (which doesn't work in embedded mode, for the 3 people that use it in the world ^^_) I am using a simple <font face="monospace">catch test_event_handler:module_info(exports)</font> which seems to do the trick.</div><div><br></div><div>Thank you Jose,<br></div><div>r.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 14, 2019 at 8:34 PM José Valim <<a href="mailto:jose.valim@plataformatec.com.br" target="_blank">jose.valim@plataformatec.com.br</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It is probably related to the module being loaded? function_exported/3 does not load modules and will return false if the module has not been loaded yet. Something in rebar3 lifecycle may be loading it under certain circumstances. Try calling code:ensure_loaded/1 before function_exported and see if the behavior becomes consistent.-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div><br></div><div><br></div><div><span style="font-size:13px"><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Director of R&D</span></div></span></div></span></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>