<div dir="ltr">To echo Heinz's point, is there a *reason* for the deprecation?<div><br></div><div>Enquiring minds want to know...</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 4, 2018 at 8:29 AM, Oliver Korpilla <span dir="ltr"><<a href="mailto:oliver.korpilla@gmx.de" target="_blank">oliver.korpilla@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Ah yes, dependencies! I see your problem now. <br>
<br>
We're using gen_statem for a test framework written in elixir for telecoms. The FSM has been the least of our problems.<br>
<br>
I'm always amazed at the range of Erlang versions still in use. I keep forgetting that.<span class="HOEnZb"><font color="#888888"><br>
<br>
Oliver <br></font></span><div><div class="h5">
<br><br><div class="gmail_quote">On May 4, 2018 8:25:35 AM EDT, "Heinz N. Gies" <<a href="mailto:heinz@licenser.net" target="_blank">heinz@licenser.net</a>> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi Oliver,<div>I am not advocating to forbid migrating code to gen_statem when the maintainer feels it is an improvement for their code. I’m advocating for not forcing maintainers doing so for no reason.</div><div><br></div><div>Karolis brought up another very good point I didn’t even think about. Code written with gen_statem will not be able to run on older erlang releases. While that’s probably not a issue on your own code where you control the releases completely it’s a nightmare for open source and libraries.</div><div> <br><div><br><blockquote type="cite"><div>On 4. May 2018, at 14:12, Oliver Korpilla <<a href="mailto:Oliver.Korpilla@gmx.de" target="_blank">Oliver.Korpilla@gmx.de</a>> wrote:</div><br class="m_-9064216553661087982Apple-interchange-newline"><div><div style="word-wrap:break-word;line-break:after-white-space">Except for the init bug in 19.0 (which our infrastructure was fixed on for a long time) we found migrating to gen_statem a painless experience with decent improvements. But maybe we simply use a different or limited feature set? <br>
<br>
Oliver<br><br><div class="gmail_quote">On May 4, 2018 8:03:11 AM EDT, "Heinz N. Gies" <<a href="mailto:heinz@licenser.net" target="_blank">heinz@licenser.net</a>> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I have thought of that but I don’t think that’s a real option. Deprication warnings are important, this would turn all of them off which doesn’t help code quality. I want to know if something is deprecated and fix it in most cases. But as Karolis pointed out, it’s easy for a function or two but for a whole behaviour it’s nearly impossible.<div><br></div><div>It basically creates two erlang worlds, pre-statem and post-statem.</div><div><br></div><div>The stack trace is not great but it’s not as bad, it’s somewhat possible to just wrap the whole function calling it into a ifdef and call it a day. Not great it still is a decent amount of code duplication but it’s possible. <a href="https://github.com/Kyorai/clique/commit/b0e89de3cbb56396b59a1023903c7259ec2ef145#diff-7a19efbe2afedfb64aa7ec6690e9a13e" target="_blank">https://github.com/<wbr>Kyorai/clique/commit/<wbr>b0e89de3cbb56396b59a1023903c72<wbr>59ec2ef145#diff-<wbr>7a19efbe2afedfb64aa7ec6690e9a1<wbr>3e</a> would be an example. It’s more annoying then other changes but not nearly as bad as the gen_fsm</div><div><div><br><blockquote type="cite"><div>On 4. May 2018, at 13:58, Roger Lipscombe <<a href="mailto:roger@differentpla.net" target="_blank">roger@differentpla.net</a>> wrote:</div><br class="m_-9064216553661087982Apple-interchange-newline"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 4 May 2018 at 12:07, Karolis Petrauskas <span dir="ltr"><<a href="mailto:k.petrauskas@gmail.com" target="_blank">k.petrauskas@gmail.com</a>></span> wrote:<br><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><div>I agree with Heinz. The deprecation of gen_fsm forced me to stuck on OTP 19 and I dont see any reasonable path to upgrade.<br></div></div></div></blockquote><div><br></div><div>We upgraded successfully to OTP 20 (and compiled against OTP 21) by simply adding the following to the top of our gen_fsm modules:</div><div><br></div><div>-compile([nowarn_deprecated_<wbr>function]). % gen_fsm is deprecated; use gen_statem</div><div><br></div><div>It'll be a problem when gen_fsm is *removed*, but until then, we'll stick with this.</div></div></div></div>
</div></blockquote></div><br></div></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</div></div></blockquote></div><br></div></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</div></div></div><br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="font-family:Helvetica;word-wrap:break-word"><div style="margin:0in 0in 0.0001pt"><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px"><b><div style="font-style:italic;margin:0px;font-family:Calibri"><b style="color:rgb(17,85,204)"><a href="http://www.gravatar.com/avatar/204a87f81a0d9764c1f3364f53e8facf.png" style="color:rgb(17,85,204)" target="_blank">Mahesh Paolini-Subramanya</a></b></div><div style="margin:0px;font-family:Calibri"><span style="font-weight:normal">That tall bald Indian guy..</span><br></div></b></span></font></div></div><div style="font-family:Helvetica;word-wrap:break-word"><div style="margin:0in 0in 0.0001pt"><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px"><b><div style="margin:0px;font-family:Calibri"><div style="font-family:Helvetica;word-wrap:break-word"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif"><span style="font-size:11pt;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri"><span style="color:rgb(31,73,125)"><span style="color:rgb(1,108,226)"><a href="https://twitter.com/dieswaytoofast" style="color:rgb(17,85,204)" target="_blank">Twitter</a></span></span><span style="color:rgb(31,73,125)"> | </span><b style="font-size:15px;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><span style="font-size:11pt;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><b style="color:rgb(31,73,125);font-size:15px;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><b style="font-family:Calibri,sans-serif;font-size:15px"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><span style="font-size:11pt;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;color:rgb(1,108,226);display:inline!important"><span style="color:rgb(31,73,125)"><a href="http://dieswaytoofast.blogspot.com/" style="color:rgb(17,85,204)" target="_blank"><span style="color:rgb(1,108,226)">Blog</span></a></span> <span style="color:rgb(31,73,125)">| </span></div></span></div></div></div></b></div></div></div></b><b style="font-size:15px;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><span style="font-size:11pt;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><b style="font-size:15px;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><b style="font-family:Calibri,sans-serif;font-size:15px"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><span style="font-size:11pt;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><a href="https://plus.google.com/u/0/108074935470209044442/posts" style="color:rgb(17,85,204)" target="_blank">G+</a></div></span></div></div></div></b></div></div></div></b></div></span></div></div></div></b></div></span></div></div></div></b><b style="font-size:15px;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><span style="font-size:11pt;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><b style="font-family:Calibri,sans-serif;font-size:15px"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><span style="font-size:11pt;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><b style="font-size:15px;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><span style="font-size:11pt;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><b style="font-size:15px;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><b style="font-family:Calibri,sans-serif;font-size:15px"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><span style="font-size:11pt;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;color:rgb(1,108,226);display:inline!important"> <span style="color:rgb(31,73,125)">| </span></div></span></div></div></div></b></div></div></div></b></div></span></div></div></div></b></div></span></div></div></div></b></div></span></div></div></div></b><b style="font-size:15px;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><b style="font-family:Calibri,sans-serif;font-size:15px"><div style="margin:0px;font-family:Calibri;display:inline!important"><div style="font-family:Helvetica;word-wrap:break-word;display:inline!important"><div style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:'Times New Roman',serif;display:inline!important"><span style="font-size:11pt;font-family:Calibri,sans-serif"><div style="margin:0px;font-family:Calibri;color:rgb(1,108,226);display:inline!important"><a href="http://www.linkedin.com/in/dieswaytoofast" style="color:rgb(17,85,204)" target="_blank">LinkedIn</a></div></span></div></div></div></b></div></div></div></b></div></span></div></div></div></b></span></font></div></div></div></div></div></div></div></div>
</div>