Interesting ...  the `Application.compile_env` spoiled me though, has been 
long enough where I wouldn't mind having an `Application.get_in_env`, not 
necessary, but honestly really handy.

On Wednesday, July 27, 2022 at 6:05:08 AM UTC-4 José Valim wrote:

> You can already do:
>
>     Application.get_env(app, key1)[key2][key3]
>
> Or pipe to get_in afterwards.
>
> The reason why we added paths to compile_env is mostly because we need to 
> know the path in order to know what parts of the environment has become 
> stale, but otherwise we would not have added such feature. So you can 
> achieve similar to get_in/3 today, the only reason for it to also support 
> paths is consistency.
>
> On Wed, Jul 27, 2022 at 12:01 PM luk...@niemier.pl <luk...@niemier.pl> 
> wrote:
>
>> Maybe we could have `Application.get_in_env` that would operate like 
>> `get_in/2` on the return value of `Application.get_env/2`.
>>
>> wtorek, 5 lipca 2022 o 12:37:02 UTC+2 José Valim napisał(a):
>>
>>> Unfortunately Application.get_env accepted anything as key in previous 
>>> versions. It has been deprecated but it means we cannot accept paths for 
>>> now.
>>>
>>> On Tue, Jul 5, 2022 at 12:33 PM lostko...@gmail.com <lostko...@gmail.com> 
>>> wrote:
>>>
>>>> I just noticed that `Application.compile_env` accepts a path of keys 
>>>> besides a single key. `Application.get_env` doesn't seem to support that. 
>>>> Is there a reason for this difference? If not I'd like to see that 
>>>> possibility be added so their parameters are aligned.
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "elixir-lang-core" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to elixir-lang-co...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/elixir-lang-core/e74a7739-e11d-4aad-8550-b17fd6839a2bn%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/elixir-lang-core/e74a7739-e11d-4aad-8550-b17fd6839a2bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "elixir-lang-core" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to elixir-lang-co...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elixir-lang-core/6822ffb2-2b5a-4594-974c-e26aeae0c976n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/elixir-lang-core/6822ffb2-2b5a-4594-974c-e26aeae0c976n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/b0d1c2d8-3f15-4921-93ac-7a1bff338f5bn%40googlegroups.com.

Reply via email to