3 ms·
> You create a 'release' and you can even instruct it to read some arguments from the env vars. That's my main complain about Elixir. Releasing and configuri
by dudul 9y ago
> You create a 'release' and you can even instruct it to read some arguments from the env vars.
That's my main complain about Elixir. Releasing and configuring at runtime is a huge pain. I honestly don't see any value in this whole "compile time configuration". If it's at compile time, I can put it in the code. What I call configuration is things I can change at runtime. The fact that something that is a given in any language (config via env vars) requires an extra dependency in Elixir is kind of sad.
Otherwise I love the language, the paradigm and the platform.
- plainOldText 9y agoI think I fail to see your point. You can fetch any environment variable – e.g. `System.get_env("SHELL")` – and do whatever with it. But distillery has its own way of defining configurations. You can still mix and match.
- anko 9y agoYep, I think there should be some included Config behaviour module which handles the serialising / deserialising of a config file, and genservers can register themselves against it, and when the config changes the registered genservers get terminated and restarted gracefully. I don't think it's very much work - but everytime i try to build something like this I go down this path of trying to work out exactly what the architecture should be like. Maybe it's a config application you include in extra_applications. How would you tell it the format of the file? How could you do validations? And then maybe do an escript or similar for configuring it on the fly - something like "elixir_set <variable> <value>"