Phoenix endpoint config {:system, "ENV"} question.

Hi there,

I knew I can get runtime env use {:system, “ENV”} setting format. I have a question after I read the endpoint’s source code.

As this line said, the {:system, “ENV”} format will deprecate after elixir 1.7+. I want to know what change in Elixir 1.7+ made this happen?



I think this is an arbitrary choice. I’m not aware of any technical reasons that might be a cause for this deprecation, except for the fact that distillery 2.0 and therefore config providers are available for Elixir >= 1.6.

:system tuples in all of their variations have always been a hack rather than a cure.


You are correct. I added those notes a long time ago, thinking that a solution would arrive to Elixir earlier (this was added probably around the time the first proposals regarding config were made to the forum) but Elixir v1.9 will make the config providers approach official, so we will likely deprecate it when Elixir 1.11 or 1.12 is out.