Open lhoguin opened 3 days ago
Thanks for your report, I've opened a draft PR #8902 for maint
that restores the old behavior specifically for this argument. I figured that it's better to do so than to raise an error, as the latter is bound to get very confusing regardless of how we word it.
Describe the bug It's technically not a bug as the inetrc Kernel variable is documented to be a string:
However, something has changed in OTP-27 that should be improved at least a bit: the error message.
We have been testing that using an atom works in the RabbitMQ test suite because some users were using atoms (it turns out that the RabbitMQ documentation was telling people to use single quotes, whoops). It breaks for OTP-27. I understand we should have been telling people to use double quotes, and that's fine to require that change.
What isn't expected however is to have so many obscure crashes when you provide an invalid value for the filename. Since using
erl -kernel inetrc \"$FILE\"
is a documented way of setting this value, and it's so easy to confuse single and double quotes (especially coming from outside the Erlang world), the VM should probably validate and error out early instead of the below.In OTP-26 we could set
inetrc
as an atom:In OTP-27 we get horrible crashes:
Expected behavior Better errors.
Affected versions OTP-27.
Additional context We will fix the RabbitMQ documentation. We will probably tell people to use the
ERL_INETRC
environment variable as it's less likely to lead to errors.