<div dir="ltr"><div><div class="gmail_signature"><div dir="ltr"><div>Howdy people,</div><div><br></div><div>I just released a library called otp_vsn which defines helpful macros if you write code that spans multiple OTP releases.</div><div><br></div><div><div>This saves you the copy/pasting/tweaking of erl_opts's platform_define.</div><div>Header-only, no dependencies. Supports releases from R16B01 to latest.</div></div><div><br></div><div>For example if you want to use the #{maps => syntax} but still be able to compile your code on releases earlier than 17.5 you can use ifdef(OTP_VSN_17_AND_ABOVE).</div><div><br></div><div>This release is super fresh (published 15 minutes ago) and feedback is welcomed!</div><div>I'm looking for macros that are re-defined often such as</div><div>* the maps thing I mention above</div><div>* stdlib types getting renamed</div><div>* functions being moved/renamed</div><div><br></div><div>I think this library could be the place to put them in & help the community write code that still compiles on newer releases of Erlang :)</div><div><br></div><div><a href="https://hex.pm/packages/otp_vsn">https://hex.pm/packages/otp_vsn</a><br></div><div><a href="https://github.com/fenollp/otp_vsn">https://github.com/fenollp/otp_vsn</a><br></div><div><br></div><div>Thanks & have a nice day</div></div></div></div>
</div>