It does not sound like it's only a convention based on this part of the
documentation: http://erlang.org/doc/man/config.html
For example: "When installing a new release version, the new sys.config
is read and used to update the application configurations."
I do not know if that is truly representative of what the code is doing,
though.
Cheers,
--
Loïc Hoguin
https://ninenines.eu
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
One of the first things that the application master
Like an operating system, Erlang has several levels. The runtime system boot stuff assumes very little about standard libraries at all, and what you're going to do with any flags that don't affect the runtime system directly. Then the kernel and stdlib basics adds some conventions but still don't assume too much about overall system behaviour. Then, the application controller adds conventions about applications and -config (but lets you have as many config files as you like, with arbitrary names). Then, the release handler and reltool, if you use them, add further conventions, such as "you should only have one main config file". (For historical reasons, you may also find abstraction leaks between these layers.)
Even more, I see distillery supports an OS environment variable SYS_CONFIG_PATH to be able to point to an arbitrary config file (whose basename can be anything). I wonder if that may be handy for production deployments in which the machine that generates the release does not have access to sensible config data.
It is not a convention. Only with a file named sys.config will the runtime read in additional configs you may include within it by name. With sys.config you can do:[{my_app, [...]},"other.config"}].